@woopsocial/typescript-sdk 0.0.7

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 (645) hide show
  1. package/FUNCTIONS.md +87 -0
  2. package/README.md +474 -0
  3. package/RUNTIMES.md +48 -0
  4. package/esm/core.d.ts +10 -0
  5. package/esm/core.d.ts.map +1 -0
  6. package/esm/core.js +13 -0
  7. package/esm/core.js.map +1 -0
  8. package/esm/funcs/health-get-health.d.ts +17 -0
  9. package/esm/funcs/health-get-health.d.ts.map +1 -0
  10. package/esm/funcs/health-get-health.js +68 -0
  11. package/esm/funcs/health-get-health.js.map +1 -0
  12. package/esm/funcs/media-complete-upload-session.d.ts +15 -0
  13. package/esm/funcs/media-complete-upload-session.d.ts.map +1 -0
  14. package/esm/funcs/media-complete-upload-session.js +82 -0
  15. package/esm/funcs/media-complete-upload-session.js.map +1 -0
  16. package/esm/funcs/media-create-media.d.ts +25 -0
  17. package/esm/funcs/media-create-media.d.ts.map +1 -0
  18. package/esm/funcs/media-create-media.js +93 -0
  19. package/esm/funcs/media-create-media.js.map +1 -0
  20. package/esm/funcs/media-create-upload-session.d.ts +27 -0
  21. package/esm/funcs/media-create-upload-session.d.ts.map +1 -0
  22. package/esm/funcs/media-create-upload-session.js +89 -0
  23. package/esm/funcs/media-create-upload-session.js.map +1 -0
  24. package/esm/funcs/media-get-upload-session.d.ts +15 -0
  25. package/esm/funcs/media-get-upload-session.d.ts.map +1 -0
  26. package/esm/funcs/media-get-upload-session.js +82 -0
  27. package/esm/funcs/media-get-upload-session.js.map +1 -0
  28. package/esm/funcs/posts-create-posts.d.ts +23 -0
  29. package/esm/funcs/posts-create-posts.d.ts.map +1 -0
  30. package/esm/funcs/posts-create-posts.js +85 -0
  31. package/esm/funcs/posts-create-posts.js.map +1 -0
  32. package/esm/funcs/posts-delete-posts.d.ts +21 -0
  33. package/esm/funcs/posts-delete-posts.d.ts.map +1 -0
  34. package/esm/funcs/posts-delete-posts.js +83 -0
  35. package/esm/funcs/posts-delete-posts.js.map +1 -0
  36. package/esm/funcs/posts-list-posts.d.ts +17 -0
  37. package/esm/funcs/posts-list-posts.d.ts.map +1 -0
  38. package/esm/funcs/posts-list-posts.js +81 -0
  39. package/esm/funcs/posts-list-posts.js.map +1 -0
  40. package/esm/funcs/posts-update-posts.d.ts +21 -0
  41. package/esm/funcs/posts-update-posts.d.ts.map +1 -0
  42. package/esm/funcs/posts-update-posts.js +83 -0
  43. package/esm/funcs/posts-update-posts.js.map +1 -0
  44. package/esm/funcs/projects-list-projects.d.ts +17 -0
  45. package/esm/funcs/projects-list-projects.d.ts.map +1 -0
  46. package/esm/funcs/projects-list-projects.js +69 -0
  47. package/esm/funcs/projects-list-projects.js.map +1 -0
  48. package/esm/funcs/social-accounts-create-o-auth-authorization.d.ts +17 -0
  49. package/esm/funcs/social-accounts-create-o-auth-authorization.d.ts.map +1 -0
  50. package/esm/funcs/social-accounts-create-o-auth-authorization.js +79 -0
  51. package/esm/funcs/social-accounts-create-o-auth-authorization.js.map +1 -0
  52. package/esm/funcs/social-accounts-get-social-account-platform-inputs.d.ts +20 -0
  53. package/esm/funcs/social-accounts-get-social-account-platform-inputs.d.ts.map +1 -0
  54. package/esm/funcs/social-accounts-get-social-account-platform-inputs.js +87 -0
  55. package/esm/funcs/social-accounts-get-social-account-platform-inputs.js.map +1 -0
  56. package/esm/funcs/social-accounts-list-social-accounts.d.ts +20 -0
  57. package/esm/funcs/social-accounts-list-social-accounts.d.ts.map +1 -0
  58. package/esm/funcs/social-accounts-list-social-accounts.js +85 -0
  59. package/esm/funcs/social-accounts-list-social-accounts.js.map +1 -0
  60. package/esm/hooks/hooks.d.ts +25 -0
  61. package/esm/hooks/hooks.d.ts.map +1 -0
  62. package/esm/hooks/hooks.js +80 -0
  63. package/esm/hooks/hooks.js.map +1 -0
  64. package/esm/hooks/index.d.ts +3 -0
  65. package/esm/hooks/index.d.ts.map +1 -0
  66. package/esm/hooks/index.js +6 -0
  67. package/esm/hooks/index.js.map +1 -0
  68. package/esm/hooks/types.d.ts +76 -0
  69. package/esm/hooks/types.d.ts.map +1 -0
  70. package/esm/hooks/types.js +5 -0
  71. package/esm/hooks/types.js.map +1 -0
  72. package/esm/index.d.ts +6 -0
  73. package/esm/index.d.ts.map +1 -0
  74. package/esm/index.js +8 -0
  75. package/esm/index.js.map +1 -0
  76. package/esm/lib/base64.d.ts +10 -0
  77. package/esm/lib/base64.d.ts.map +1 -0
  78. package/esm/lib/base64.js +31 -0
  79. package/esm/lib/base64.js.map +1 -0
  80. package/esm/lib/config.d.ts +38 -0
  81. package/esm/lib/config.d.ts.map +1 -0
  82. package/esm/lib/config.js +34 -0
  83. package/esm/lib/config.js.map +1 -0
  84. package/esm/lib/dlv.d.ts +14 -0
  85. package/esm/lib/dlv.d.ts.map +1 -0
  86. package/esm/lib/dlv.js +46 -0
  87. package/esm/lib/dlv.js.map +1 -0
  88. package/esm/lib/encodings.d.ts +53 -0
  89. package/esm/lib/encodings.d.ts.map +1 -0
  90. package/esm/lib/encodings.js +385 -0
  91. package/esm/lib/encodings.js.map +1 -0
  92. package/esm/lib/env.d.ts +15 -0
  93. package/esm/lib/env.d.ts.map +1 -0
  94. package/esm/lib/env.js +44 -0
  95. package/esm/lib/env.js.map +1 -0
  96. package/esm/lib/files.d.ts +26 -0
  97. package/esm/lib/files.d.ts.map +1 -0
  98. package/esm/lib/files.js +91 -0
  99. package/esm/lib/files.js.map +1 -0
  100. package/esm/lib/http.d.ts +67 -0
  101. package/esm/lib/http.d.ts.map +1 -0
  102. package/esm/lib/http.js +209 -0
  103. package/esm/lib/http.js.map +1 -0
  104. package/esm/lib/is-plain-object.d.ts +2 -0
  105. package/esm/lib/is-plain-object.d.ts.map +1 -0
  106. package/esm/lib/is-plain-object.js +38 -0
  107. package/esm/lib/is-plain-object.js.map +1 -0
  108. package/esm/lib/logger.d.ts +6 -0
  109. package/esm/lib/logger.d.ts.map +1 -0
  110. package/esm/lib/logger.js +5 -0
  111. package/esm/lib/logger.js.map +1 -0
  112. package/esm/lib/matchers.d.ts +59 -0
  113. package/esm/lib/matchers.d.ts.map +1 -0
  114. package/esm/lib/matchers.js +202 -0
  115. package/esm/lib/matchers.js.map +1 -0
  116. package/esm/lib/primitives.d.ts +26 -0
  117. package/esm/lib/primitives.d.ts.map +1 -0
  118. package/esm/lib/primitives.js +103 -0
  119. package/esm/lib/primitives.js.map +1 -0
  120. package/esm/lib/retries.d.ts +38 -0
  121. package/esm/lib/retries.d.ts.map +1 -0
  122. package/esm/lib/retries.js +150 -0
  123. package/esm/lib/retries.js.map +1 -0
  124. package/esm/lib/schemas.d.ts +21 -0
  125. package/esm/lib/schemas.d.ts.map +1 -0
  126. package/esm/lib/schemas.js +57 -0
  127. package/esm/lib/schemas.js.map +1 -0
  128. package/esm/lib/sdks.d.ts +63 -0
  129. package/esm/lib/sdks.d.ts.map +1 -0
  130. package/esm/lib/sdks.js +262 -0
  131. package/esm/lib/sdks.js.map +1 -0
  132. package/esm/lib/security.d.ts +83 -0
  133. package/esm/lib/security.d.ts.map +1 -0
  134. package/esm/lib/security.js +149 -0
  135. package/esm/lib/security.js.map +1 -0
  136. package/esm/lib/url.d.ts +5 -0
  137. package/esm/lib/url.d.ts.map +1 -0
  138. package/esm/lib/url.js +24 -0
  139. package/esm/lib/url.js.map +1 -0
  140. package/esm/models/create-media-response.d.ts +13 -0
  141. package/esm/models/create-media-response.d.ts.map +1 -0
  142. package/esm/models/create-media-response.js +14 -0
  143. package/esm/models/create-media-response.js.map +1 -0
  144. package/esm/models/create-o-auth-authorization-request.d.ts +21 -0
  145. package/esm/models/create-o-auth-authorization-request.d.ts.map +1 -0
  146. package/esm/models/create-o-auth-authorization-request.js +14 -0
  147. package/esm/models/create-o-auth-authorization-request.js.map +1 -0
  148. package/esm/models/create-o-auth-authorization-response.d.ts +13 -0
  149. package/esm/models/create-o-auth-authorization-response.d.ts.map +1 -0
  150. package/esm/models/create-o-auth-authorization-response.js +14 -0
  151. package/esm/models/create-o-auth-authorization-response.js.map +1 -0
  152. package/esm/models/create-post-failure-code.d.ts +16 -0
  153. package/esm/models/create-post-failure-code.d.ts.map +1 -0
  154. package/esm/models/create-post-failure-code.js +17 -0
  155. package/esm/models/create-post-failure-code.js.map +1 -0
  156. package/esm/models/create-post-failure-result.d.ts +33 -0
  157. package/esm/models/create-post-failure-result.d.ts.map +1 -0
  158. package/esm/models/create-post-failure-result.js +22 -0
  159. package/esm/models/create-post-failure-result.js.map +1 -0
  160. package/esm/models/create-post-item.d.ts +47 -0
  161. package/esm/models/create-post-item.d.ts.map +1 -0
  162. package/esm/models/create-post-item.js +21 -0
  163. package/esm/models/create-post-item.js.map +1 -0
  164. package/esm/models/create-post-result.d.ts +11 -0
  165. package/esm/models/create-post-result.d.ts.map +1 -0
  166. package/esm/models/create-post-result.js +16 -0
  167. package/esm/models/create-post-result.js.map +1 -0
  168. package/esm/models/create-post-success-result.d.ts +23 -0
  169. package/esm/models/create-post-success-result.d.ts.map +1 -0
  170. package/esm/models/create-post-success-result.js +18 -0
  171. package/esm/models/create-post-success-result.js.map +1 -0
  172. package/esm/models/create-posts-response.d.ts +14 -0
  173. package/esm/models/create-posts-response.d.ts.map +1 -0
  174. package/esm/models/create-posts-response.js +14 -0
  175. package/esm/models/create-posts-response.js.map +1 -0
  176. package/esm/models/create-upload-session-request.d.ts +20 -0
  177. package/esm/models/create-upload-session-request.d.ts.map +1 -0
  178. package/esm/models/create-upload-session-request.js +13 -0
  179. package/esm/models/create-upload-session-request.js.map +1 -0
  180. package/esm/models/delete-post-failure-code.d.ts +11 -0
  181. package/esm/models/delete-post-failure-code.d.ts.map +1 -0
  182. package/esm/models/delete-post-failure-code.js +12 -0
  183. package/esm/models/delete-post-failure-code.js.map +1 -0
  184. package/esm/models/delete-post-failure-result.d.ts +17 -0
  185. package/esm/models/delete-post-failure-result.d.ts.map +1 -0
  186. package/esm/models/delete-post-failure-result.js +18 -0
  187. package/esm/models/delete-post-failure-result.js.map +1 -0
  188. package/esm/models/delete-post-result.d.ts +11 -0
  189. package/esm/models/delete-post-result.d.ts.map +1 -0
  190. package/esm/models/delete-post-result.js +16 -0
  191. package/esm/models/delete-post-result.js.map +1 -0
  192. package/esm/models/delete-post-success-result.d.ts +14 -0
  193. package/esm/models/delete-post-success-result.d.ts.map +1 -0
  194. package/esm/models/delete-post-success-result.js +15 -0
  195. package/esm/models/delete-post-success-result.js.map +1 -0
  196. package/esm/models/delete-posts-response.d.ts +14 -0
  197. package/esm/models/delete-posts-response.d.ts.map +1 -0
  198. package/esm/models/delete-posts-response.js +14 -0
  199. package/esm/models/delete-posts-response.js.map +1 -0
  200. package/esm/models/delivery-status.d.ts +34 -0
  201. package/esm/models/delivery-status.d.ts.map +1 -0
  202. package/esm/models/delivery-status.js +25 -0
  203. package/esm/models/delivery-status.js.map +1 -0
  204. package/esm/models/errors/http-client-errors.d.ts +44 -0
  205. package/esm/models/errors/http-client-errors.d.ts.map +1 -0
  206. package/esm/models/errors/http-client-errors.js +56 -0
  207. package/esm/models/errors/http-client-errors.js.map +1 -0
  208. package/esm/models/errors/index.d.ts +6 -0
  209. package/esm/models/errors/index.d.ts.map +1 -0
  210. package/esm/models/errors/index.js +9 -0
  211. package/esm/models/errors/index.js.map +1 -0
  212. package/esm/models/errors/response-validation-error.d.ts +26 -0
  213. package/esm/models/errors/response-validation-error.d.ts.map +1 -0
  214. package/esm/models/errors/response-validation-error.js +37 -0
  215. package/esm/models/errors/response-validation-error.js.map +1 -0
  216. package/esm/models/errors/sdk-validation-error.d.ts +21 -0
  217. package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
  218. package/esm/models/errors/sdk-validation-error.js +52 -0
  219. package/esm/models/errors/sdk-validation-error.js.map +1 -0
  220. package/esm/models/errors/woop-social-default-error.d.ts +10 -0
  221. package/esm/models/errors/woop-social-default-error.d.ts.map +1 -0
  222. package/esm/models/errors/woop-social-default-error.js +30 -0
  223. package/esm/models/errors/woop-social-default-error.js.map +1 -0
  224. package/esm/models/errors/woop-social-error.d.ts +19 -0
  225. package/esm/models/errors/woop-social-error.d.ts.map +1 -0
  226. package/esm/models/errors/woop-social-error.js +26 -0
  227. package/esm/models/errors/woop-social-error.js.map +1 -0
  228. package/esm/models/facebook-post-type.d.ts +14 -0
  229. package/esm/models/facebook-post-type.d.ts.map +1 -0
  230. package/esm/models/facebook-post-type.js +15 -0
  231. package/esm/models/facebook-post-type.js.map +1 -0
  232. package/esm/models/facebook-specifics.d.ts +22 -0
  233. package/esm/models/facebook-specifics.d.ts.map +1 -0
  234. package/esm/models/facebook-specifics.js +26 -0
  235. package/esm/models/facebook-specifics.js.map +1 -0
  236. package/esm/models/health-response.d.ts +21 -0
  237. package/esm/models/health-response.d.ts.map +1 -0
  238. package/esm/models/health-response.js +16 -0
  239. package/esm/models/health-response.js.map +1 -0
  240. package/esm/models/index.d.ts +61 -0
  241. package/esm/models/index.d.ts.map +1 -0
  242. package/esm/models/index.js +64 -0
  243. package/esm/models/index.js.map +1 -0
  244. package/esm/models/instagram-post-type.d.ts +13 -0
  245. package/esm/models/instagram-post-type.d.ts.map +1 -0
  246. package/esm/models/instagram-post-type.js +14 -0
  247. package/esm/models/instagram-post-type.js.map +1 -0
  248. package/esm/models/instagram-specifics.d.ts +20 -0
  249. package/esm/models/instagram-specifics.d.ts.map +1 -0
  250. package/esm/models/instagram-specifics.js +24 -0
  251. package/esm/models/instagram-specifics.js.map +1 -0
  252. package/esm/models/linked-in-pages-specifics.d.ts +17 -0
  253. package/esm/models/linked-in-pages-specifics.d.ts.map +1 -0
  254. package/esm/models/linked-in-pages-specifics.js +21 -0
  255. package/esm/models/linked-in-pages-specifics.js.map +1 -0
  256. package/esm/models/linked-in-specifics.d.ts +17 -0
  257. package/esm/models/linked-in-specifics.d.ts.map +1 -0
  258. package/esm/models/linked-in-specifics.js +21 -0
  259. package/esm/models/linked-in-specifics.js.map +1 -0
  260. package/esm/models/list-posts-request.d.ts +43 -0
  261. package/esm/models/list-posts-request.d.ts.map +1 -0
  262. package/esm/models/list-posts-request.js +17 -0
  263. package/esm/models/list-posts-request.js.map +1 -0
  264. package/esm/models/list-posts-response.d.ts +15 -0
  265. package/esm/models/list-posts-response.d.ts.map +1 -0
  266. package/esm/models/list-posts-response.js +16 -0
  267. package/esm/models/list-posts-response.js.map +1 -0
  268. package/esm/models/operations/complete-upload-session.d.ts +15 -0
  269. package/esm/models/operations/complete-upload-session.d.ts.map +1 -0
  270. package/esm/models/operations/complete-upload-session.js +12 -0
  271. package/esm/models/operations/complete-upload-session.js.map +1 -0
  272. package/esm/models/operations/create-media.d.ts +17 -0
  273. package/esm/models/operations/create-media.d.ts.map +1 -0
  274. package/esm/models/operations/create-media.js +18 -0
  275. package/esm/models/operations/create-media.js.map +1 -0
  276. package/esm/models/operations/get-social-account-platform-inputs.d.ts +15 -0
  277. package/esm/models/operations/get-social-account-platform-inputs.d.ts.map +1 -0
  278. package/esm/models/operations/get-social-account-platform-inputs.js +12 -0
  279. package/esm/models/operations/get-social-account-platform-inputs.js.map +1 -0
  280. package/esm/models/operations/get-upload-session.d.ts +15 -0
  281. package/esm/models/operations/get-upload-session.d.ts.map +1 -0
  282. package/esm/models/operations/get-upload-session.js +12 -0
  283. package/esm/models/operations/get-upload-session.js.map +1 -0
  284. package/esm/models/operations/index.d.ts +6 -0
  285. package/esm/models/operations/index.d.ts.map +1 -0
  286. package/esm/models/operations/index.js +9 -0
  287. package/esm/models/operations/index.js.map +1 -0
  288. package/esm/models/operations/list-social-accounts.d.ts +15 -0
  289. package/esm/models/operations/list-social-accounts.d.ts.map +1 -0
  290. package/esm/models/operations/list-social-accounts.js +12 -0
  291. package/esm/models/operations/list-social-accounts.js.map +1 -0
  292. package/esm/models/pinterest-account-platform-inputs.d.ts +19 -0
  293. package/esm/models/pinterest-account-platform-inputs.d.ts.map +1 -0
  294. package/esm/models/pinterest-account-platform-inputs.js +14 -0
  295. package/esm/models/pinterest-account-platform-inputs.js.map +1 -0
  296. package/esm/models/pinterest-board-option.d.ts +17 -0
  297. package/esm/models/pinterest-board-option.d.ts.map +1 -0
  298. package/esm/models/pinterest-board-option.js +15 -0
  299. package/esm/models/pinterest-board-option.js.map +1 -0
  300. package/esm/models/pinterest-social-account-platform-specific-inputs.d.ts +12 -0
  301. package/esm/models/pinterest-social-account-platform-specific-inputs.d.ts.map +1 -0
  302. package/esm/models/pinterest-social-account-platform-specific-inputs.js +17 -0
  303. package/esm/models/pinterest-social-account-platform-specific-inputs.js.map +1 -0
  304. package/esm/models/pinterest-specifics.d.ts +19 -0
  305. package/esm/models/pinterest-specifics.d.ts.map +1 -0
  306. package/esm/models/pinterest-specifics.js +23 -0
  307. package/esm/models/pinterest-specifics.js.map +1 -0
  308. package/esm/models/platform-specifics.d.ts +25 -0
  309. package/esm/models/platform-specifics.d.ts.map +1 -0
  310. package/esm/models/platform-specifics.js +43 -0
  311. package/esm/models/platform-specifics.js.map +1 -0
  312. package/esm/models/post-media.d.ts +30 -0
  313. package/esm/models/post-media.d.ts.map +1 -0
  314. package/esm/models/post-media.js +26 -0
  315. package/esm/models/post-media.js.map +1 -0
  316. package/esm/models/post.d.ts +69 -0
  317. package/esm/models/post.d.ts.map +1 -0
  318. package/esm/models/post.js +33 -0
  319. package/esm/models/post.js.map +1 -0
  320. package/esm/models/project.d.ts +17 -0
  321. package/esm/models/project.d.ts.map +1 -0
  322. package/esm/models/project.js +15 -0
  323. package/esm/models/project.js.map +1 -0
  324. package/esm/models/security.d.ts +12 -0
  325. package/esm/models/security.d.ts.map +1 -0
  326. package/esm/models/security.js +17 -0
  327. package/esm/models/security.js.map +1 -0
  328. package/esm/models/social-account-platform-inputs.d.ts +20 -0
  329. package/esm/models/social-account-platform-inputs.d.ts.map +1 -0
  330. package/esm/models/social-account-platform-inputs.js +18 -0
  331. package/esm/models/social-account-platform-inputs.js.map +1 -0
  332. package/esm/models/social-account-platform-specific-inputs.d.ts +11 -0
  333. package/esm/models/social-account-platform-specific-inputs.d.ts.map +1 -0
  334. package/esm/models/social-account-platform-specific-inputs.js +16 -0
  335. package/esm/models/social-account-platform-specific-inputs.js.map +1 -0
  336. package/esm/models/social-account-status.d.ts +10 -0
  337. package/esm/models/social-account-status.d.ts.map +1 -0
  338. package/esm/models/social-account-status.js +11 -0
  339. package/esm/models/social-account-status.js.map +1 -0
  340. package/esm/models/social-account.d.ts +28 -0
  341. package/esm/models/social-account.d.ts.map +1 -0
  342. package/esm/models/social-account.js +20 -0
  343. package/esm/models/social-account.js.map +1 -0
  344. package/esm/models/social-platform.d.ts +24 -0
  345. package/esm/models/social-platform.d.ts.map +1 -0
  346. package/esm/models/social-platform.js +22 -0
  347. package/esm/models/social-platform.js.map +1 -0
  348. package/esm/models/tik-tok-account-platform-inputs.d.ts +35 -0
  349. package/esm/models/tik-tok-account-platform-inputs.d.ts.map +1 -0
  350. package/esm/models/tik-tok-account-platform-inputs.js +19 -0
  351. package/esm/models/tik-tok-account-platform-inputs.js.map +1 -0
  352. package/esm/models/tik-tok-post-type.d.ts +12 -0
  353. package/esm/models/tik-tok-post-type.d.ts.map +1 -0
  354. package/esm/models/tik-tok-post-type.js +13 -0
  355. package/esm/models/tik-tok-post-type.js.map +1 -0
  356. package/esm/models/tik-tok-privacy-level.d.ts +14 -0
  357. package/esm/models/tik-tok-privacy-level.d.ts.map +1 -0
  358. package/esm/models/tik-tok-privacy-level.js +15 -0
  359. package/esm/models/tik-tok-privacy-level.js.map +1 -0
  360. package/esm/models/tik-tok-social-account-platform-specific-inputs.d.ts +12 -0
  361. package/esm/models/tik-tok-social-account-platform-specific-inputs.d.ts.map +1 -0
  362. package/esm/models/tik-tok-social-account-platform-specific-inputs.js +16 -0
  363. package/esm/models/tik-tok-social-account-platform-specific-inputs.js.map +1 -0
  364. package/esm/models/tik-tok-specifics.d.ts +37 -0
  365. package/esm/models/tik-tok-specifics.d.ts.map +1 -0
  366. package/esm/models/tik-tok-specifics.js +41 -0
  367. package/esm/models/tik-tok-specifics.js.map +1 -0
  368. package/esm/models/update-post-failure-code.d.ts +14 -0
  369. package/esm/models/update-post-failure-code.d.ts.map +1 -0
  370. package/esm/models/update-post-failure-code.js +15 -0
  371. package/esm/models/update-post-failure-code.js.map +1 -0
  372. package/esm/models/update-post-failure-result.d.ts +33 -0
  373. package/esm/models/update-post-failure-result.d.ts.map +1 -0
  374. package/esm/models/update-post-failure-result.js +22 -0
  375. package/esm/models/update-post-failure-result.js.map +1 -0
  376. package/esm/models/update-post-item.d.ts +37 -0
  377. package/esm/models/update-post-item.d.ts.map +1 -0
  378. package/esm/models/update-post-item.js +19 -0
  379. package/esm/models/update-post-item.js.map +1 -0
  380. package/esm/models/update-post-result.d.ts +11 -0
  381. package/esm/models/update-post-result.d.ts.map +1 -0
  382. package/esm/models/update-post-result.js +16 -0
  383. package/esm/models/update-post-result.js.map +1 -0
  384. package/esm/models/update-post-success-result.d.ts +19 -0
  385. package/esm/models/update-post-success-result.d.ts.map +1 -0
  386. package/esm/models/update-post-success-result.js +17 -0
  387. package/esm/models/update-post-success-result.js.map +1 -0
  388. package/esm/models/update-posts-response.d.ts +14 -0
  389. package/esm/models/update-posts-response.d.ts.map +1 -0
  390. package/esm/models/update-posts-response.js +14 -0
  391. package/esm/models/update-posts-response.js.map +1 -0
  392. package/esm/models/upload-session-part.d.ts +17 -0
  393. package/esm/models/upload-session-part.d.ts.map +1 -0
  394. package/esm/models/upload-session-part.js +15 -0
  395. package/esm/models/upload-session-part.js.map +1 -0
  396. package/esm/models/upload-session-status-value.d.ts +13 -0
  397. package/esm/models/upload-session-status-value.d.ts.map +1 -0
  398. package/esm/models/upload-session-status-value.js +14 -0
  399. package/esm/models/upload-session-status-value.js.map +1 -0
  400. package/esm/models/upload-session-status.d.ts +18 -0
  401. package/esm/models/upload-session-status.d.ts.map +1 -0
  402. package/esm/models/upload-session-status.js +19 -0
  403. package/esm/models/upload-session-status.js.map +1 -0
  404. package/esm/models/upload-session.d.ts +36 -0
  405. package/esm/models/upload-session.d.ts.map +1 -0
  406. package/esm/models/upload-session.js +19 -0
  407. package/esm/models/upload-session.js.map +1 -0
  408. package/esm/models/validation-error.d.ts +12 -0
  409. package/esm/models/validation-error.d.ts.map +1 -0
  410. package/esm/models/validation-error.js +16 -0
  411. package/esm/models/validation-error.js.map +1 -0
  412. package/esm/models/validation-field.d.ts +20 -0
  413. package/esm/models/validation-field.d.ts.map +1 -0
  414. package/esm/models/validation-field.js +21 -0
  415. package/esm/models/validation-field.js.map +1 -0
  416. package/esm/models/validation-warning.d.ts +12 -0
  417. package/esm/models/validation-warning.d.ts.map +1 -0
  418. package/esm/models/validation-warning.js +16 -0
  419. package/esm/models/validation-warning.js.map +1 -0
  420. package/esm/models/x-specifics.d.ts +17 -0
  421. package/esm/models/x-specifics.d.ts.map +1 -0
  422. package/esm/models/x-specifics.js +22 -0
  423. package/esm/models/x-specifics.js.map +1 -0
  424. package/esm/models/you-tube-privacy.d.ts +13 -0
  425. package/esm/models/you-tube-privacy.d.ts.map +1 -0
  426. package/esm/models/you-tube-privacy.js +14 -0
  427. package/esm/models/you-tube-privacy.js.map +1 -0
  428. package/esm/models/you-tube-specifics.d.ts +26 -0
  429. package/esm/models/you-tube-specifics.d.ts.map +1 -0
  430. package/esm/models/you-tube-specifics.js +30 -0
  431. package/esm/models/you-tube-specifics.js.map +1 -0
  432. package/esm/sdk/health.d.ts +12 -0
  433. package/esm/sdk/health.d.ts.map +1 -0
  434. package/esm/sdk/health.js +18 -0
  435. package/esm/sdk/health.js.map +1 -0
  436. package/esm/sdk/index.d.ts +2 -0
  437. package/esm/sdk/index.d.ts.map +1 -0
  438. package/esm/sdk/index.js +5 -0
  439. package/esm/sdk/index.js.map +1 -0
  440. package/esm/sdk/media.d.ts +45 -0
  441. package/esm/sdk/media.d.ts.map +1 -0
  442. package/esm/sdk/media.js +59 -0
  443. package/esm/sdk/media.js.map +1 -0
  444. package/esm/sdk/posts.d.ts +47 -0
  445. package/esm/sdk/posts.d.ts.map +1 -0
  446. package/esm/sdk/posts.js +62 -0
  447. package/esm/sdk/posts.js.map +1 -0
  448. package/esm/sdk/projects.d.ts +12 -0
  449. package/esm/sdk/projects.d.ts.map +1 -0
  450. package/esm/sdk/projects.js +18 -0
  451. package/esm/sdk/projects.js.map +1 -0
  452. package/esm/sdk/sdk.d.ts +19 -0
  453. package/esm/sdk/sdk.d.ts.map +1 -0
  454. package/esm/sdk/sdk.js +32 -0
  455. package/esm/sdk/sdk.js.map +1 -0
  456. package/esm/sdk/social-accounts.d.ts +31 -0
  457. package/esm/sdk/social-accounts.d.ts.map +1 -0
  458. package/esm/sdk/social-accounts.js +42 -0
  459. package/esm/sdk/social-accounts.js.map +1 -0
  460. package/esm/types/async.d.ts +23 -0
  461. package/esm/types/async.d.ts.map +1 -0
  462. package/esm/types/async.js +28 -0
  463. package/esm/types/async.js.map +1 -0
  464. package/esm/types/blobs.d.ts +4 -0
  465. package/esm/types/blobs.d.ts.map +1 -0
  466. package/esm/types/blobs.js +25 -0
  467. package/esm/types/blobs.js.map +1 -0
  468. package/esm/types/const-date-time.d.ts +3 -0
  469. package/esm/types/const-date-time.d.ts.map +1 -0
  470. package/esm/types/const-date-time.js +10 -0
  471. package/esm/types/const-date-time.js.map +1 -0
  472. package/esm/types/default-to-zero-value.d.ts +12 -0
  473. package/esm/types/default-to-zero-value.d.ts.map +1 -0
  474. package/esm/types/default-to-zero-value.js +31 -0
  475. package/esm/types/default-to-zero-value.js.map +1 -0
  476. package/esm/types/discriminated-union.d.ts +25 -0
  477. package/esm/types/discriminated-union.d.ts.map +1 -0
  478. package/esm/types/discriminated-union.js +61 -0
  479. package/esm/types/discriminated-union.js.map +1 -0
  480. package/esm/types/enums.d.ts +9 -0
  481. package/esm/types/enums.d.ts.map +1 -0
  482. package/esm/types/enums.js +27 -0
  483. package/esm/types/enums.js.map +1 -0
  484. package/esm/types/fp.d.ts +31 -0
  485. package/esm/types/fp.d.ts.map +1 -0
  486. package/esm/types/fp.js +31 -0
  487. package/esm/types/fp.js.map +1 -0
  488. package/esm/types/index.d.ts +10 -0
  489. package/esm/types/index.d.ts.map +1 -0
  490. package/esm/types/index.js +10 -0
  491. package/esm/types/index.js.map +1 -0
  492. package/esm/types/operations.d.ts +27 -0
  493. package/esm/types/operations.d.ts.map +1 -0
  494. package/esm/types/operations.js +77 -0
  495. package/esm/types/operations.js.map +1 -0
  496. package/esm/types/primitives.d.ts +11 -0
  497. package/esm/types/primitives.d.ts.map +1 -0
  498. package/esm/types/primitives.js +132 -0
  499. package/esm/types/primitives.js.map +1 -0
  500. package/esm/types/rfcdate.d.ts +21 -0
  501. package/esm/types/rfcdate.d.ts.map +1 -0
  502. package/esm/types/rfcdate.js +43 -0
  503. package/esm/types/rfcdate.js.map +1 -0
  504. package/esm/types/smart-union.d.ts +7 -0
  505. package/esm/types/smart-union.d.ts.map +1 -0
  506. package/esm/types/smart-union.js +118 -0
  507. package/esm/types/smart-union.js.map +1 -0
  508. package/esm/types/streams.d.ts +2 -0
  509. package/esm/types/streams.d.ts.map +1 -0
  510. package/esm/types/streams.js +15 -0
  511. package/esm/types/streams.js.map +1 -0
  512. package/esm/types/unrecognized.d.ts +16 -0
  513. package/esm/types/unrecognized.d.ts.map +1 -0
  514. package/esm/types/unrecognized.js +31 -0
  515. package/esm/types/unrecognized.js.map +1 -0
  516. package/jsr.json +27 -0
  517. package/package.json +75 -0
  518. package/src/core.ts +13 -0
  519. package/src/funcs/health-get-health.ts +142 -0
  520. package/src/funcs/media-complete-upload-session.ts +167 -0
  521. package/src/funcs/media-create-media.ts +176 -0
  522. package/src/funcs/media-create-upload-session.ts +171 -0
  523. package/src/funcs/media-get-upload-session.ts +167 -0
  524. package/src/funcs/posts-create-posts.ts +167 -0
  525. package/src/funcs/posts-delete-posts.ts +165 -0
  526. package/src/funcs/posts-list-posts.ts +164 -0
  527. package/src/funcs/posts-update-posts.ts +165 -0
  528. package/src/funcs/projects-list-projects.ts +143 -0
  529. package/src/funcs/social-accounts-create-o-auth-authorization.ts +162 -0
  530. package/src/funcs/social-accounts-get-social-account-platform-inputs.ts +175 -0
  531. package/src/funcs/social-accounts-list-social-accounts.ts +172 -0
  532. package/src/hooks/hooks.ts +129 -0
  533. package/src/hooks/index.ts +6 -0
  534. package/src/hooks/types.ts +107 -0
  535. package/src/index.ts +9 -0
  536. package/src/lib/base64.ts +39 -0
  537. package/src/lib/config.ts +68 -0
  538. package/src/lib/dlv.ts +53 -0
  539. package/src/lib/encodings.ts +520 -0
  540. package/src/lib/env.ts +57 -0
  541. package/src/lib/files.ts +104 -0
  542. package/src/lib/http.ts +323 -0
  543. package/src/lib/is-plain-object.ts +43 -0
  544. package/src/lib/logger.ts +9 -0
  545. package/src/lib/matchers.ts +353 -0
  546. package/src/lib/primitives.ts +150 -0
  547. package/src/lib/retries.ts +218 -0
  548. package/src/lib/schemas.ts +94 -0
  549. package/src/lib/sdks.ts +408 -0
  550. package/src/lib/security.ts +275 -0
  551. package/src/lib/url.ts +35 -0
  552. package/src/models/create-media-response.ts +34 -0
  553. package/src/models/create-o-auth-authorization-request.ts +45 -0
  554. package/src/models/create-o-auth-authorization-response.ts +34 -0
  555. package/src/models/create-post-failure-code.ts +25 -0
  556. package/src/models/create-post-failure-result.ts +68 -0
  557. package/src/models/create-post-item.ts +73 -0
  558. package/src/models/create-post-result.ts +42 -0
  559. package/src/models/create-post-success-result.ts +50 -0
  560. package/src/models/create-posts-response.ts +37 -0
  561. package/src/models/create-upload-session-request.ts +39 -0
  562. package/src/models/delete-post-failure-code.ts +20 -0
  563. package/src/models/delete-post-failure-result.ts +44 -0
  564. package/src/models/delete-post-result.ts +42 -0
  565. package/src/models/delete-post-success-result.ts +36 -0
  566. package/src/models/delete-posts-response.ts +37 -0
  567. package/src/models/delivery-status.ts +46 -0
  568. package/src/models/errors/http-client-errors.ts +62 -0
  569. package/src/models/errors/index.ts +9 -0
  570. package/src/models/errors/response-validation-error.ts +50 -0
  571. package/src/models/errors/sdk-validation-error.ts +54 -0
  572. package/src/models/errors/woop-social-default-error.ts +40 -0
  573. package/src/models/errors/woop-social-error.ts +35 -0
  574. package/src/models/facebook-post-type.ts +26 -0
  575. package/src/models/facebook-specifics.ts +63 -0
  576. package/src/models/health-response.ts +44 -0
  577. package/src/models/index.ts +64 -0
  578. package/src/models/instagram-post-type.ts +25 -0
  579. package/src/models/instagram-specifics.ts +59 -0
  580. package/src/models/linked-in-pages-specifics.ts +50 -0
  581. package/src/models/linked-in-specifics.ts +50 -0
  582. package/src/models/list-posts-request.ts +68 -0
  583. package/src/models/list-posts-response.ts +37 -0
  584. package/src/models/operations/complete-upload-session.ts +35 -0
  585. package/src/models/operations/create-media.ts +41 -0
  586. package/src/models/operations/get-social-account-platform-inputs.ts +36 -0
  587. package/src/models/operations/get-upload-session.ts +33 -0
  588. package/src/models/operations/index.ts +9 -0
  589. package/src/models/operations/list-social-accounts.ts +33 -0
  590. package/src/models/pinterest-account-platform-inputs.ts +42 -0
  591. package/src/models/pinterest-board-option.ts +39 -0
  592. package/src/models/pinterest-social-account-platform-specific-inputs.ts +42 -0
  593. package/src/models/pinterest-specifics.ts +54 -0
  594. package/src/models/platform-specifics.ts +129 -0
  595. package/src/models/post-media.ts +56 -0
  596. package/src/models/post.ts +111 -0
  597. package/src/models/project.ts +36 -0
  598. package/src/models/security.ts +34 -0
  599. package/src/models/social-account-platform-inputs.ts +49 -0
  600. package/src/models/social-account-platform-specific-inputs.ts +43 -0
  601. package/src/models/social-account-status.ts +19 -0
  602. package/src/models/social-account.ts +59 -0
  603. package/src/models/social-platform.ts +36 -0
  604. package/src/models/tik-tok-account-platform-inputs.ts +63 -0
  605. package/src/models/tik-tok-post-type.ts +24 -0
  606. package/src/models/tik-tok-privacy-level.ts +26 -0
  607. package/src/models/tik-tok-social-account-platform-specific-inputs.ts +41 -0
  608. package/src/models/tik-tok-specifics.ts +94 -0
  609. package/src/models/update-post-failure-code.ts +23 -0
  610. package/src/models/update-post-failure-result.ts +68 -0
  611. package/src/models/update-post-item.ts +61 -0
  612. package/src/models/update-post-result.ts +42 -0
  613. package/src/models/update-post-success-result.ts +45 -0
  614. package/src/models/update-posts-response.ts +37 -0
  615. package/src/models/upload-session-part.ts +39 -0
  616. package/src/models/upload-session-status-value.ts +24 -0
  617. package/src/models/upload-session-status.ts +46 -0
  618. package/src/models/upload-session.ts +64 -0
  619. package/src/models/validation-error.ts +37 -0
  620. package/src/models/validation-field.ts +29 -0
  621. package/src/models/validation-warning.ts +37 -0
  622. package/src/models/x-specifics.ts +44 -0
  623. package/src/models/you-tube-privacy.ts +25 -0
  624. package/src/models/you-tube-specifics.ts +71 -0
  625. package/src/sdk/health.ts +25 -0
  626. package/src/sdk/index.ts +5 -0
  627. package/src/sdk/media.ts +93 -0
  628. package/src/sdk/posts.ts +95 -0
  629. package/src/sdk/projects.ts +25 -0
  630. package/src/sdk/sdk.ts +37 -0
  631. package/src/sdk/social-accounts.ts +68 -0
  632. package/src/types/async.ts +68 -0
  633. package/src/types/blobs.ts +33 -0
  634. package/src/types/const-date-time.ts +15 -0
  635. package/src/types/default-to-zero-value.ts +33 -0
  636. package/src/types/discriminated-union.ts +101 -0
  637. package/src/types/enums.ts +45 -0
  638. package/src/types/fp.ts +50 -0
  639. package/src/types/index.ts +13 -0
  640. package/src/types/operations.ts +105 -0
  641. package/src/types/primitives.ts +168 -0
  642. package/src/types/rfcdate.ts +54 -0
  643. package/src/types/smart-union.ts +154 -0
  644. package/src/types/streams.ts +21 -0
  645. package/src/types/unrecognized.ts +35 -0
package/FUNCTIONS.md ADDED
@@ -0,0 +1,87 @@
1
+ # Standalone Functions
2
+
3
+ > [!NOTE]
4
+ > This section is useful if you are using a bundler and targetting browsers and
5
+ > runtimes where the size of an application affects performance and load times.
6
+
7
+ Every method in this SDK is also available as a standalone function. This
8
+ alternative API is suitable when targetting the browser or serverless runtimes
9
+ and using a bundler to build your application since all unused functionality
10
+ will be tree-shaken away. This includes code for unused methods, Zod schemas,
11
+ encoding helpers and response handlers. The result is dramatically smaller
12
+ impact on the application's final bundle size which grows very slowly as you use
13
+ more and more functionality from this SDK.
14
+
15
+ Calling methods through the main SDK class remains a valid and generally more
16
+ more ergonomic option. Standalone functions represent an optimisation for a
17
+ specific category of applications.
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import { WoopSocialCore } from "@woopsocial/typescript-sdk/core.js";
23
+ import { postsListPosts } from "@woopsocial/typescript-sdk/funcs/posts-list-posts.js";
24
+
25
+ // Use `WoopSocialCore` for best tree-shaking performance.
26
+ // You can create one instance of it to use across an application.
27
+ const woopSocial = new WoopSocialCore({
28
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
29
+ });
30
+
31
+ async function run() {
32
+ const res = await postsListPosts(woopSocial);
33
+ if (res.ok) {
34
+ const { value: result } = res;
35
+ console.log(result);
36
+ } else {
37
+ console.log("postsListPosts failed:", res.error);
38
+ }
39
+ }
40
+
41
+ run();
42
+ ```
43
+
44
+ ## Result types
45
+
46
+ Standalone functions differ from SDK methods in that they return a
47
+ `Result<Value, Error>` type to capture _known errors_ and document them using
48
+ the type system. By avoiding throwing errors, application code maintains clear
49
+ control flow and error-handling become part of the regular flow of application
50
+ code.
51
+
52
+ > We use the term "known errors" because standalone functions, and JavaScript
53
+ > code in general, can still throw unexpected errors such as `TypeError`s,
54
+ > `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
55
+ > something this SDK addresses in the future. Nevertheless, there is still a lot
56
+ > of benefit from capturing most errors and turning them into values.
57
+
58
+ The second reason for this style of programming is because these functions will
59
+ typically be used in front-end applications where exception throwing is
60
+ sometimes discouraged or considered unidiomatic. React and similar ecosystems
61
+ and libraries tend to promote this style of programming so that components
62
+ render useful content under all states (loading, success, error and so on).
63
+
64
+ The general pattern when calling standalone functions looks like this:
65
+
66
+ ```typescript
67
+ import { Core } from "<sdk-package-name>";
68
+ import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
69
+
70
+ const client = new Core();
71
+
72
+ async function run() {
73
+ const result = await fetchSomething(client, { id: "123" });
74
+ if (!result.ok) {
75
+ // You can throw the error or handle it. It's your choice now.
76
+ throw result.error;
77
+ }
78
+
79
+ console.log(result.value);
80
+ }
81
+
82
+ run();
83
+ ```
84
+
85
+ Notably, `result.error` above will have an explicit type compared to a try-catch
86
+ variation where the error in the catch block can only be of type `unknown` (or
87
+ `any` depending on your TypeScript settings).
package/README.md ADDED
@@ -0,0 +1,474 @@
1
+ # @woopsocial/typescript-sdk
2
+
3
+ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *woopsocial* API.
4
+
5
+ [![Built by Speakeasy](https://img.shields.io/badge/Built_by-SPEAKEASY-374151?style=for-the-badge&labelColor=f3f4f6)](https://www.speakeasy.com/?utm_source=woopsocial&utm_campaign=typescript)
6
+ [![License: MIT](https://img.shields.io/badge/LICENSE_//_MIT-3b5bdb?style=for-the-badge&labelColor=eff6ff)](https://opensource.org/licenses/MIT)
7
+
8
+ <!-- Start Summary [summary] -->
9
+ ## Summary
10
+
11
+ WoopSocial API: API for WoopSocial integrations.
12
+
13
+ This is the public-facing OpenAPI contract for WoopSocial. It supports scheduling posts for various social media platforms such as Facebook, Instagram, LinkedIn, LinkedIn Pages, Pinterest, TikTok, X (formerly Twitter) and YouTube.
14
+ <!-- End Summary [summary] -->
15
+
16
+ <!-- Start Table of Contents [toc] -->
17
+ ## Table of Contents
18
+ <!-- $toc-max-depth=2 -->
19
+ * [@woopsocial/typescript-sdk](#woopsocialtypescript-sdk)
20
+ * [SDK Installation](#sdk-installation)
21
+ * [Requirements](#requirements)
22
+ * [SDK Example Usage](#sdk-example-usage)
23
+ * [Authentication](#authentication)
24
+ * [Available Resources and Operations](#available-resources-and-operations)
25
+ * [Standalone functions](#standalone-functions)
26
+ * [File uploads](#file-uploads)
27
+ * [Retries](#retries)
28
+ * [Error Handling](#error-handling)
29
+ * [Server Selection](#server-selection)
30
+ * [Custom HTTP Client](#custom-http-client)
31
+ * [Debugging](#debugging)
32
+ * [Development](#development)
33
+ * [Maturity](#maturity)
34
+ * [Contributions](#contributions)
35
+
36
+ <!-- End Table of Contents [toc] -->
37
+
38
+ <!-- Start SDK Installation [installation] -->
39
+ ## SDK Installation
40
+
41
+ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
42
+
43
+ ### NPM
44
+
45
+ ```bash
46
+ npm add @woopsocial/typescript-sdk
47
+ ```
48
+
49
+ ### PNPM
50
+
51
+ ```bash
52
+ pnpm add @woopsocial/typescript-sdk
53
+ ```
54
+
55
+ ### Bun
56
+
57
+ ```bash
58
+ bun add @woopsocial/typescript-sdk
59
+ ```
60
+
61
+ ### Yarn
62
+
63
+ ```bash
64
+ yarn add @woopsocial/typescript-sdk
65
+ ```
66
+
67
+ > [!NOTE]
68
+ > This package is published as an ES Module (ESM) only. For applications using
69
+ > CommonJS, use `await import()` to import and use this package.
70
+ <!-- No SDK Installation [installation] -->
71
+
72
+ <!-- Start Requirements [requirements] -->
73
+ ## Requirements
74
+
75
+ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
76
+ <!-- End Requirements [requirements] -->
77
+
78
+ <!-- Start SDK Example Usage [usage] -->
79
+ ## SDK Example Usage
80
+
81
+ ### Example
82
+
83
+ ```typescript
84
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
85
+
86
+ const woopSocial = new WoopSocial({
87
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
88
+ });
89
+
90
+ async function run() {
91
+ const result = await woopSocial.posts.listPosts();
92
+
93
+ console.log(result);
94
+ }
95
+
96
+ run();
97
+
98
+ ```
99
+ <!-- End SDK Example Usage [usage] -->
100
+
101
+ <!-- Start Authentication [security] -->
102
+ ## Authentication
103
+
104
+ ### Per-Client Security Schemes
105
+
106
+ This SDK supports the following security scheme globally:
107
+
108
+ | Name | Type | Scheme | Environment Variable |
109
+ | ------------ | ---- | ----------- | ------------------------ |
110
+ | `bearerAuth` | http | HTTP Bearer | `WOOPSOCIAL_BEARER_AUTH` |
111
+
112
+ To authenticate with the API the `bearerAuth` parameter must be set when initializing the SDK client instance. For example:
113
+ ```typescript
114
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
115
+
116
+ const woopSocial = new WoopSocial({
117
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
118
+ });
119
+
120
+ async function run() {
121
+ const result = await woopSocial.posts.listPosts();
122
+
123
+ console.log(result);
124
+ }
125
+
126
+ run();
127
+
128
+ ```
129
+ <!-- End Authentication [security] -->
130
+
131
+ <!-- Start Available Resources and Operations [operations] -->
132
+ ## Available Resources and Operations
133
+
134
+ <details open>
135
+ <summary>Available methods</summary>
136
+
137
+ ### [Health](docs/sdks/health/README.md)
138
+
139
+ * [getHealth](docs/sdks/health/README.md#gethealth) - Health check
140
+
141
+ ### [Media](docs/sdks/media/README.md)
142
+
143
+ * [createMedia](docs/sdks/media/README.md#createmedia) - Upload media
144
+ * [createUploadSession](docs/sdks/media/README.md#createuploadsession) - Start media upload session
145
+ * [getUploadSession](docs/sdks/media/README.md#getuploadsession) - Get media upload session status
146
+ * [completeUploadSession](docs/sdks/media/README.md#completeuploadsession) - Complete media upload session
147
+
148
+ ### [Posts](docs/sdks/posts/README.md)
149
+
150
+ * [listPosts](docs/sdks/posts/README.md#listposts) - List posts
151
+ * [deletePosts](docs/sdks/posts/README.md#deleteposts) - Delete posts
152
+ * [createPosts](docs/sdks/posts/README.md#createposts) - Create posts
153
+ * [updatePosts](docs/sdks/posts/README.md#updateposts) - Update posts
154
+
155
+ ### [Projects](docs/sdks/projects/README.md)
156
+
157
+ * [listProjects](docs/sdks/projects/README.md#listprojects) - List projects
158
+
159
+ ### [SocialAccounts](docs/sdks/socialaccounts/README.md)
160
+
161
+ * [createOAuthAuthorization](docs/sdks/socialaccounts/README.md#createoauthauthorization) - Generate OAuth URL
162
+ * [listSocialAccounts](docs/sdks/socialaccounts/README.md#listsocialaccounts) - List social accounts
163
+ * [getSocialAccountPlatformInputs](docs/sdks/socialaccounts/README.md#getsocialaccountplatforminputs) - Get platform-specific input options
164
+
165
+ </details>
166
+ <!-- End Available Resources and Operations [operations] -->
167
+
168
+ <!-- Start Standalone functions [standalone-funcs] -->
169
+ ## Standalone functions
170
+
171
+ All the methods listed above are available as standalone functions. These
172
+ functions are ideal for use in applications running in the browser, serverless
173
+ runtimes or other environments where application bundle size is a primary
174
+ concern. When using a bundler to build your application, all unused
175
+ functionality will be either excluded from the final bundle or tree-shaken away.
176
+
177
+ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
178
+
179
+ <details>
180
+
181
+ <summary>Available standalone functions</summary>
182
+
183
+ - [`healthGetHealth`](docs/sdks/health/README.md#gethealth) - Health check
184
+ - [`mediaCompleteUploadSession`](docs/sdks/media/README.md#completeuploadsession) - Complete media upload session
185
+ - [`mediaCreateMedia`](docs/sdks/media/README.md#createmedia) - Upload media
186
+ - [`mediaCreateUploadSession`](docs/sdks/media/README.md#createuploadsession) - Start media upload session
187
+ - [`mediaGetUploadSession`](docs/sdks/media/README.md#getuploadsession) - Get media upload session status
188
+ - [`postsCreatePosts`](docs/sdks/posts/README.md#createposts) - Create posts
189
+ - [`postsDeletePosts`](docs/sdks/posts/README.md#deleteposts) - Delete posts
190
+ - [`postsListPosts`](docs/sdks/posts/README.md#listposts) - List posts
191
+ - [`postsUpdatePosts`](docs/sdks/posts/README.md#updateposts) - Update posts
192
+ - [`projectsListProjects`](docs/sdks/projects/README.md#listprojects) - List projects
193
+ - [`socialAccountsCreateOAuthAuthorization`](docs/sdks/socialaccounts/README.md#createoauthauthorization) - Generate OAuth URL
194
+ - [`socialAccountsGetSocialAccountPlatformInputs`](docs/sdks/socialaccounts/README.md#getsocialaccountplatforminputs) - Get platform-specific input options
195
+ - [`socialAccountsListSocialAccounts`](docs/sdks/socialaccounts/README.md#listsocialaccounts) - List social accounts
196
+
197
+ </details>
198
+ <!-- End Standalone functions [standalone-funcs] -->
199
+
200
+ <!-- Start File uploads [file-upload] -->
201
+ ## File uploads
202
+
203
+ Certain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
204
+
205
+ > [!TIP]
206
+ >
207
+ > Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
208
+ >
209
+ > - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options).
210
+ > - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.
211
+ > - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `<input type="file">` element.
212
+ > - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
213
+
214
+ ```typescript
215
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
216
+ import { openAsBlob } from "node:fs";
217
+
218
+ const woopSocial = new WoopSocial({
219
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
220
+ });
221
+
222
+ async function run() {
223
+ const result = await woopSocial.media.createMedia({
224
+ projectId: "<id>",
225
+ body: await openAsBlob("example.file"),
226
+ });
227
+
228
+ console.log(result);
229
+ }
230
+
231
+ run();
232
+
233
+ ```
234
+ <!-- End File uploads [file-upload] -->
235
+
236
+ <!-- Start Retries [retries] -->
237
+ ## Retries
238
+
239
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
240
+
241
+ To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
242
+ ```typescript
243
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
244
+
245
+ const woopSocial = new WoopSocial({
246
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
247
+ });
248
+
249
+ async function run() {
250
+ const result = await woopSocial.posts.listPosts(undefined, {
251
+ retries: {
252
+ strategy: "backoff",
253
+ backoff: {
254
+ initialInterval: 1,
255
+ maxInterval: 50,
256
+ exponent: 1.1,
257
+ maxElapsedTime: 100,
258
+ },
259
+ retryConnectionErrors: false,
260
+ },
261
+ });
262
+
263
+ console.log(result);
264
+ }
265
+
266
+ run();
267
+
268
+ ```
269
+
270
+ If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
271
+ ```typescript
272
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
273
+
274
+ const woopSocial = new WoopSocial({
275
+ retryConfig: {
276
+ strategy: "backoff",
277
+ backoff: {
278
+ initialInterval: 1,
279
+ maxInterval: 50,
280
+ exponent: 1.1,
281
+ maxElapsedTime: 100,
282
+ },
283
+ retryConnectionErrors: false,
284
+ },
285
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
286
+ });
287
+
288
+ async function run() {
289
+ const result = await woopSocial.posts.listPosts();
290
+
291
+ console.log(result);
292
+ }
293
+
294
+ run();
295
+
296
+ ```
297
+ <!-- End Retries [retries] -->
298
+
299
+ <!-- Start Error Handling [errors] -->
300
+ ## Error Handling
301
+
302
+ [`WoopSocialError`](./src/models/errors/woop-social-error.ts) is the base class for all HTTP error responses. It has the following properties:
303
+
304
+ | Property | Type | Description |
305
+ | ------------------- | ---------- | ------------------------------------------------------ |
306
+ | `error.message` | `string` | Error message |
307
+ | `error.statusCode` | `number` | HTTP response status code eg `404` |
308
+ | `error.headers` | `Headers` | HTTP response headers |
309
+ | `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
310
+ | `error.rawResponse` | `Response` | Raw HTTP response |
311
+
312
+ ### Example
313
+ ```typescript
314
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
315
+ import * as errors from "@woopsocial/typescript-sdk/models/errors";
316
+
317
+ const woopSocial = new WoopSocial({
318
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
319
+ });
320
+
321
+ async function run() {
322
+ try {
323
+ const result = await woopSocial.posts.listPosts();
324
+
325
+ console.log(result);
326
+ } catch (error) {
327
+ if (error instanceof errors.WoopSocialError) {
328
+ console.log(error.message);
329
+ console.log(error.statusCode);
330
+ console.log(error.body);
331
+ console.log(error.headers);
332
+ }
333
+ }
334
+ }
335
+
336
+ run();
337
+
338
+ ```
339
+
340
+ ### Error Classes
341
+ **Primary error:**
342
+ * [`WoopSocialError`](./src/models/errors/woop-social-error.ts): The base class for HTTP error responses.
343
+
344
+ <details><summary>Less common errors (6)</summary>
345
+
346
+ <br />
347
+
348
+ **Network errors:**
349
+ * [`ConnectionError`](./src/models/errors/http-client-errors.ts): HTTP client was unable to make a request to a server.
350
+ * [`RequestTimeoutError`](./src/models/errors/http-client-errors.ts): HTTP request timed out due to an AbortSignal signal.
351
+ * [`RequestAbortedError`](./src/models/errors/http-client-errors.ts): HTTP request was aborted by the client.
352
+ * [`InvalidRequestError`](./src/models/errors/http-client-errors.ts): Any input used to create a request is invalid.
353
+ * [`UnexpectedClientError`](./src/models/errors/http-client-errors.ts): Unrecognised or unexpected error.
354
+
355
+
356
+ **Inherit from [`WoopSocialError`](./src/models/errors/woop-social-error.ts)**:
357
+ * [`ResponseValidationError`](./src/models/errors/response-validation-error.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
358
+
359
+ </details>
360
+ <!-- End Error Handling [errors] -->
361
+
362
+ <!-- Start Server Selection [server] -->
363
+ ## Server Selection
364
+
365
+ ### Override Server URL Per-Client
366
+
367
+ The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
368
+ ```typescript
369
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
370
+
371
+ const woopSocial = new WoopSocial({
372
+ serverURL: "https://api.woopsocial.com/v1",
373
+ bearerAuth: process.env["WOOPSOCIAL_BEARER_AUTH"] ?? "",
374
+ });
375
+
376
+ async function run() {
377
+ const result = await woopSocial.posts.listPosts();
378
+
379
+ console.log(result);
380
+ }
381
+
382
+ run();
383
+
384
+ ```
385
+ <!-- End Server Selection [server] -->
386
+
387
+ <!-- Start Custom HTTP Client [http-client] -->
388
+ ## Custom HTTP Client
389
+
390
+ The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
391
+ [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
392
+ client is a thin wrapper around `fetch` and provides the ability to attach hooks
393
+ around the request lifecycle that can be used to modify the request or handle
394
+ errors and response.
395
+
396
+ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
397
+ used to integrate a third-party HTTP client or when writing tests to mock out
398
+ the HTTP client and feed in fixtures.
399
+
400
+ The following example shows how to:
401
+ - route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
402
+ - use the `"beforeRequest"` hook to add a custom header and a timeout to requests
403
+ - use the `"requestError"` hook to log errors
404
+
405
+ ```typescript
406
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
407
+ import { ProxyAgent } from "undici";
408
+ import { HTTPClient } from "@woopsocial/typescript-sdk/lib/http";
409
+
410
+ const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
411
+
412
+ const httpClient = new HTTPClient({
413
+ // 'fetcher' takes a function that has the same signature as native 'fetch'.
414
+ fetcher: (input, init) =>
415
+ // 'dispatcher' is specific to undici and not part of the standard Fetch API.
416
+ fetch(input, { ...init, dispatcher } as RequestInit),
417
+ });
418
+
419
+ httpClient.addHook("beforeRequest", (request) => {
420
+ const nextRequest = new Request(request, {
421
+ signal: request.signal || AbortSignal.timeout(5000)
422
+ });
423
+
424
+ nextRequest.headers.set("x-custom-header", "custom value");
425
+
426
+ return nextRequest;
427
+ });
428
+
429
+ httpClient.addHook("requestError", (error, request) => {
430
+ console.group("Request Error");
431
+ console.log("Reason:", `${error}`);
432
+ console.log("Endpoint:", `${request.method} ${request.url}`);
433
+ console.groupEnd();
434
+ });
435
+
436
+ const sdk = new WoopSocial({ httpClient: httpClient });
437
+ ```
438
+ <!-- End Custom HTTP Client [http-client] -->
439
+
440
+ <!-- Start Debugging [debug] -->
441
+ ## Debugging
442
+
443
+ You can setup your SDK to emit debug logs for SDK requests and responses.
444
+
445
+ You can pass a logger that matches `console`'s interface as an SDK option.
446
+
447
+ > [!WARNING]
448
+ > Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
449
+
450
+ ```typescript
451
+ import { WoopSocial } from "@woopsocial/typescript-sdk";
452
+
453
+ const sdk = new WoopSocial({ debugLogger: console });
454
+ ```
455
+
456
+ You can also enable a default debug logger by setting an environment variable `WOOPSOCIAL_DEBUG` to true.
457
+ <!-- End Debugging [debug] -->
458
+
459
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
460
+
461
+ # Development
462
+
463
+ ## Maturity
464
+
465
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
466
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
467
+ looking for the latest version.
468
+
469
+ ## Contributions
470
+
471
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
472
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
473
+
474
+ ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=woopsocial&utm_campaign=typescript)
package/RUNTIMES.md ADDED
@@ -0,0 +1,48 @@
1
+ # Supported JavaScript runtimes
2
+
3
+ This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
4
+
5
+ - [Web Fetch API][web-fetch]
6
+ - [Web Streams API][web-streams] and in particular `ReadableStream`
7
+ - [Async iterables][async-iter] using `Symbol.asyncIterator`
8
+
9
+ [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
10
+ [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
11
+ [async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
12
+
13
+ Runtime environments that are explicitly supported are:
14
+
15
+ - Evergreen browsers which include: Chrome, Safari, Edge, Firefox
16
+ - Node.js active and maintenance LTS releases
17
+ - Currently, this is v18 and v20
18
+ - Bun v1 and above
19
+ - Deno v1.39
20
+ - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
21
+
22
+ [deno-file-streaming]: https://github.com/denoland/deno/issues/11018
23
+
24
+ ## Recommended TypeScript compiler options
25
+
26
+ The following `tsconfig.json` options are recommended for projects using this
27
+ SDK in order to get static type support for features like async iterables,
28
+ streams and `fetch`-related APIs ([`for await...of`][for-await-of],
29
+ [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
30
+ so on):
31
+
32
+ [for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
33
+ [abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
34
+ [request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
35
+ [response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
36
+
37
+ ```jsonc
38
+ {
39
+ "compilerOptions": {
40
+ "target": "es2020", // or higher
41
+ "lib": ["es2020", "dom", "dom.iterable"]
42
+ }
43
+ }
44
+ ```
45
+
46
+ While `target` can be set to older ECMAScript versions, it may result in extra,
47
+ unnecessary compatibility code being generated if you are not targeting old
48
+ runtimes.
package/esm/core.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { ClientSDK } from "./lib/sdks.js";
2
+ /**
3
+ * A minimal client to use when calling standalone SDK functions. Typically, an
4
+ * instance of this class would be instantiated once at the start of an
5
+ * application and passed around through some dependency injection mechanism to
6
+ * parts of an application that need to make SDK calls.
7
+ */
8
+ export declare class WoopSocialCore extends ClientSDK {
9
+ }
10
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,SAAS;CAAG"}
package/esm/core.js ADDED
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { ClientSDK } from "./lib/sdks.js";
5
+ /**
6
+ * A minimal client to use when calling standalone SDK functions. Typically, an
7
+ * instance of this class would be instantiated once at the start of an
8
+ * application and passed around through some dependency injection mechanism to
9
+ * parts of an application that need to make SDK calls.
10
+ */
11
+ export class WoopSocialCore extends ClientSDK {
12
+ }
13
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,OAAO,cAAe,SAAQ,SAAS;CAAG"}
@@ -0,0 +1,17 @@
1
+ import { WoopSocialCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
4
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
5
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
6
+ import { WoopSocialError } from "../models/errors/woop-social-error.js";
7
+ import * as models from "../models/index.js";
8
+ import { APIPromise } from "../types/async.js";
9
+ import { Result } from "../types/fp.js";
10
+ /**
11
+ * Health check
12
+ *
13
+ * @remarks
14
+ * Returns a minimal response proving the WoopSocial API is reachable.
15
+ */
16
+ export declare function healthGetHealth(client: WoopSocialCore, options?: RequestOptions): APIPromise<Result<models.HealthResponse, WoopSocialError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
17
+ //# sourceMappingURL=health-get-health.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-get-health.d.ts","sourceRoot":"","sources":["../../src/funcs/health-get-health.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,cAAc,EACnB,eAAe,GACf,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAKA"}