@schedulin/sdk 0.1.2 → 0.3.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 (294) hide show
  1. package/README.md +45 -0
  2. package/cjs/BaseClient.d.ts +12 -0
  3. package/cjs/Client.d.ts +9 -0
  4. package/cjs/Client.js +23 -8
  5. package/cjs/api/errors/InternalServerError.d.ts +1 -0
  6. package/cjs/api/errors/UnauthorizedError.d.ts +1 -0
  7. package/cjs/api/resources/ai/client/Client.d.ts +49 -0
  8. package/cjs/api/resources/ai/client/Client.js +181 -0
  9. package/cjs/api/resources/ai/client/index.d.ts +1 -0
  10. package/cjs/api/resources/ai/client/index.js +17 -0
  11. package/cjs/api/resources/ai/client/requests/GenerateImageAiRequest.d.ts +20 -0
  12. package/cjs/api/resources/ai/client/requests/GenerateImageAiRequest.js +12 -0
  13. package/cjs/api/resources/{posts/client/requests/GetJobStatusPostsRequest.d.ts → ai/client/requests/GetGenerationAiRequest.d.ts} +1 -1
  14. package/cjs/api/resources/ai/client/requests/index.d.ts +2 -0
  15. package/cjs/api/resources/ai/client/requests/index.js +5 -0
  16. package/cjs/api/resources/ai/exports.d.ts +2 -0
  17. package/cjs/api/resources/ai/exports.js +21 -0
  18. package/cjs/api/resources/ai/index.d.ts +1 -0
  19. package/cjs/api/resources/ai/index.js +17 -0
  20. package/cjs/api/resources/index.d.ts +6 -0
  21. package/cjs/api/resources/index.js +7 -1
  22. package/cjs/api/resources/media/client/Client.d.ts +83 -0
  23. package/cjs/api/resources/media/client/Client.js +260 -3
  24. package/cjs/api/resources/media/client/requests/CreateFromUrlMediaRequest.d.ts +12 -0
  25. package/cjs/api/resources/media/client/requests/CreateFromUrlMediaRequest.js +3 -0
  26. package/cjs/api/resources/media/client/requests/CreateUploadLinkMediaRequest.d.ts +7 -0
  27. package/cjs/api/resources/media/client/requests/CreateUploadLinkMediaRequest.js +3 -0
  28. package/{esm/api/resources/posts/client/requests/GetJobStatusPostsRequest.d.mts → cjs/api/resources/media/client/requests/DeleteMediaRequest.d.ts} +1 -1
  29. package/cjs/api/resources/media/client/requests/DeleteMediaRequest.js +3 -0
  30. package/cjs/api/resources/media/client/requests/UploadMediaRequest.d.ts +13 -0
  31. package/cjs/api/resources/media/client/requests/UploadMediaRequest.js +3 -0
  32. package/cjs/api/resources/media/client/requests/index.d.ts +4 -0
  33. package/cjs/api/resources/platforms/client/Client.d.ts +28 -0
  34. package/cjs/api/resources/platforms/client/Client.js +111 -0
  35. package/cjs/api/resources/platforms/client/index.d.ts +1 -0
  36. package/cjs/api/resources/platforms/client/index.js +2 -0
  37. package/cjs/api/resources/platforms/exports.d.ts +2 -0
  38. package/cjs/api/resources/platforms/exports.js +21 -0
  39. package/cjs/api/resources/platforms/index.d.ts +2 -0
  40. package/cjs/api/resources/platforms/index.js +18 -0
  41. package/cjs/api/resources/platforms/types/ListPlatformsResponse.d.ts +56 -0
  42. package/cjs/api/resources/platforms/types/ListPlatformsResponse.js +24 -0
  43. package/cjs/api/resources/platforms/types/index.d.ts +1 -0
  44. package/cjs/api/resources/platforms/types/index.js +17 -0
  45. package/cjs/api/resources/posts/client/Client.d.ts +22 -18
  46. package/cjs/api/resources/posts/client/Client.js +30 -62
  47. package/cjs/api/resources/posts/client/requests/ListPostsRequest.d.ts +1 -0
  48. package/cjs/api/resources/posts/client/requests/PostCreate.d.ts +64 -0
  49. package/cjs/api/resources/posts/client/requests/PostCreate.js +63 -0
  50. package/cjs/api/resources/posts/client/requests/UpdatePostsRequest.d.ts +0 -2
  51. package/cjs/api/resources/posts/client/requests/UpdatePostsRequest.js +0 -2
  52. package/cjs/api/resources/posts/client/requests/index.d.ts +0 -1
  53. package/cjs/api/resources/posts/types/CreatePostsResponse.d.ts +21 -0
  54. package/cjs/api/resources/posts/types/CreatePostsResponse.js +21 -0
  55. package/cjs/api/resources/posts/types/ListPostsRequestStatusesItem.d.ts +8 -0
  56. package/cjs/api/resources/posts/types/ListPostsRequestStatusesItem.js +11 -0
  57. package/cjs/api/resources/posts/types/index.d.ts +1 -0
  58. package/cjs/api/resources/posts/types/index.js +1 -0
  59. package/cjs/api/resources/socialAccounts/client/Client.d.ts +68 -1
  60. package/cjs/api/resources/socialAccounts/client/Client.js +210 -4
  61. package/cjs/api/resources/socialAccounts/client/requests/ListWhopCompaniesSocialAccountsRequest.d.ts +9 -0
  62. package/cjs/api/resources/socialAccounts/client/requests/ListWhopCompaniesSocialAccountsRequest.js +3 -0
  63. package/cjs/api/resources/socialAccounts/client/requests/ListWhopForumsSocialAccountsRequest.d.ts +11 -0
  64. package/cjs/api/resources/socialAccounts/client/requests/ListWhopForumsSocialAccountsRequest.js +3 -0
  65. package/cjs/api/resources/socialAccounts/client/requests/NextSlotsSocialAccountsRequest.d.ts +11 -0
  66. package/cjs/api/resources/socialAccounts/client/requests/NextSlotsSocialAccountsRequest.js +3 -0
  67. package/cjs/api/resources/socialAccounts/client/requests/index.d.ts +3 -0
  68. package/cjs/api/resources/socialAccounts/types/ListSocialAccountsResponse.d.ts +22 -0
  69. package/cjs/api/resources/socialAccounts/types/ListSocialAccountsResponse.js +21 -0
  70. package/cjs/api/resources/socialAccounts/types/ListWhopCompaniesSocialAccountsResponse.d.ts +12 -0
  71. package/cjs/api/resources/socialAccounts/types/ListWhopCompaniesSocialAccountsResponse.js +3 -0
  72. package/cjs/api/resources/socialAccounts/types/ListWhopForumsSocialAccountsResponse.d.ts +12 -0
  73. package/cjs/api/resources/socialAccounts/types/ListWhopForumsSocialAccountsResponse.js +3 -0
  74. package/cjs/api/resources/socialAccounts/types/NextSlotsSocialAccountsResponse.d.ts +3 -0
  75. package/cjs/api/resources/socialAccounts/types/NextSlotsSocialAccountsResponse.js +3 -0
  76. package/cjs/api/resources/socialAccounts/types/index.d.ts +3 -0
  77. package/cjs/api/resources/socialAccounts/types/index.js +3 -0
  78. package/cjs/api/resources/tags/client/Client.d.ts +8 -0
  79. package/cjs/api/resources/tags/client/Client.js +12 -3
  80. package/cjs/api/resources/webhooks/client/Client.d.ts +155 -0
  81. package/cjs/api/resources/webhooks/client/Client.js +538 -0
  82. package/cjs/api/resources/webhooks/client/index.d.ts +1 -0
  83. package/cjs/api/resources/webhooks/client/index.js +17 -0
  84. package/cjs/api/resources/webhooks/client/requests/CreateWebhooksRequest.d.ts +24 -0
  85. package/cjs/api/resources/webhooks/client/requests/CreateWebhooksRequest.js +16 -0
  86. package/cjs/api/resources/webhooks/client/requests/DeleteWebhooksRequest.d.ts +9 -0
  87. package/cjs/api/resources/webhooks/client/requests/DeleteWebhooksRequest.js +3 -0
  88. package/cjs/api/resources/webhooks/client/requests/ListDeliveriesWebhooksRequest.d.ts +11 -0
  89. package/cjs/api/resources/webhooks/client/requests/ListDeliveriesWebhooksRequest.js +3 -0
  90. package/cjs/api/resources/webhooks/client/requests/RetrieveWebhooksRequest.d.ts +9 -0
  91. package/cjs/api/resources/webhooks/client/requests/RetrieveWebhooksRequest.js +3 -0
  92. package/cjs/api/resources/webhooks/client/requests/RotateSecretWebhooksRequest.d.ts +9 -0
  93. package/cjs/api/resources/webhooks/client/requests/RotateSecretWebhooksRequest.js +3 -0
  94. package/cjs/api/resources/webhooks/client/requests/TestWebhooksRequest.d.ts +9 -0
  95. package/cjs/api/resources/webhooks/client/requests/TestWebhooksRequest.js +3 -0
  96. package/cjs/api/resources/webhooks/client/requests/UpdateWebhooksRequest.d.ts +25 -0
  97. package/cjs/api/resources/webhooks/client/requests/UpdateWebhooksRequest.js +16 -0
  98. package/cjs/api/resources/webhooks/client/requests/index.d.ts +7 -0
  99. package/cjs/api/resources/webhooks/client/requests/index.js +7 -0
  100. package/cjs/api/resources/webhooks/exports.d.ts +2 -0
  101. package/cjs/api/resources/webhooks/exports.js +21 -0
  102. package/cjs/api/resources/webhooks/index.d.ts +1 -0
  103. package/cjs/api/resources/webhooks/index.js +17 -0
  104. package/cjs/api/types/OauthScope.d.ts +12 -0
  105. package/cjs/api/types/OauthScope.js +12 -0
  106. package/cjs/api/types/PostSearch.d.ts +12 -0
  107. package/cjs/api/types/PostSearch.js +10 -0
  108. package/cjs/api/types/PostWithRelations.d.ts +21 -0
  109. package/cjs/api/types/PostWithRelations.js +21 -0
  110. package/cjs/api/types/SocialAccountDisconnectedReason.d.ts +1 -0
  111. package/cjs/api/types/SocialAccountDisconnectedReason.js +1 -0
  112. package/cjs/api/types/SocialPlatform.d.ts +21 -0
  113. package/cjs/api/types/SocialPlatform.js +21 -0
  114. package/cjs/core/exports.d.ts +1 -0
  115. package/cjs/core/exports.js +1 -0
  116. package/cjs/core/fetcher/Fetcher.js +9 -92
  117. package/cjs/core/fetcher/makePassthroughRequest.js +26 -4
  118. package/cjs/core/fetcher/redactUrl.d.ts +2 -0
  119. package/cjs/core/fetcher/redactUrl.js +88 -0
  120. package/cjs/core/file/exports.d.ts +1 -0
  121. package/cjs/core/file/exports.js +2 -0
  122. package/cjs/core/file/file.d.ts +10 -0
  123. package/cjs/core/file/file.js +225 -0
  124. package/cjs/core/file/index.d.ts +2 -0
  125. package/cjs/core/file/index.js +18 -0
  126. package/cjs/core/file/types.d.ts +66 -0
  127. package/cjs/core/file/types.js +2 -0
  128. package/cjs/core/form-data-utils/FormDataWrapper.d.ts +15 -0
  129. package/cjs/core/form-data-utils/FormDataWrapper.js +188 -0
  130. package/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  131. package/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
  132. package/cjs/core/form-data-utils/index.d.ts +2 -0
  133. package/cjs/core/form-data-utils/index.js +20 -0
  134. package/cjs/core/index.d.ts +2 -0
  135. package/cjs/core/index.js +3 -1
  136. package/cjs/core/requestBody.d.ts +12 -0
  137. package/cjs/core/requestBody.js +26 -0
  138. package/cjs/core/runtime/index.d.ts +1 -1
  139. package/cjs/core/runtime/index.js +2 -1
  140. package/cjs/core/runtime/runtime.d.ts +19 -0
  141. package/cjs/core/runtime/runtime.js +74 -2
  142. package/cjs/core/url/qs.js +2 -2
  143. package/cjs/errors/SchedulinError.d.ts +1 -0
  144. package/cjs/errors/SchedulinError.js +4 -0
  145. package/cjs/errors/SchedulinTimeoutError.d.ts +2 -2
  146. package/cjs/errors/SchedulinTimeoutError.js +39 -5
  147. package/esm/BaseClient.d.mts +12 -0
  148. package/esm/Client.d.mts +9 -0
  149. package/esm/Client.mjs +15 -0
  150. package/esm/api/errors/InternalServerError.d.mts +1 -0
  151. package/esm/api/errors/UnauthorizedError.d.mts +1 -0
  152. package/esm/api/resources/ai/client/Client.d.mts +49 -0
  153. package/esm/api/resources/ai/client/Client.mjs +144 -0
  154. package/esm/api/resources/ai/client/index.d.mts +1 -0
  155. package/esm/api/resources/ai/client/index.mjs +1 -0
  156. package/esm/api/resources/ai/client/requests/GenerateImageAiRequest.d.mts +20 -0
  157. package/esm/api/resources/ai/client/requests/GenerateImageAiRequest.mjs +9 -0
  158. package/esm/api/resources/ai/client/requests/GetGenerationAiRequest.d.mts +9 -0
  159. package/esm/api/resources/ai/client/requests/index.d.mts +2 -0
  160. package/esm/api/resources/ai/client/requests/index.mjs +1 -0
  161. package/esm/api/resources/ai/exports.d.mts +2 -0
  162. package/esm/api/resources/ai/exports.mjs +3 -0
  163. package/esm/api/resources/ai/index.d.mts +1 -0
  164. package/esm/api/resources/ai/index.mjs +1 -0
  165. package/esm/api/resources/index.d.mts +6 -0
  166. package/esm/api/resources/index.mjs +6 -0
  167. package/esm/api/resources/media/client/Client.d.mts +83 -0
  168. package/esm/api/resources/media/client/Client.mjs +261 -4
  169. package/esm/api/resources/media/client/requests/CreateFromUrlMediaRequest.d.mts +12 -0
  170. package/esm/api/resources/media/client/requests/CreateFromUrlMediaRequest.mjs +2 -0
  171. package/esm/api/resources/media/client/requests/CreateUploadLinkMediaRequest.d.mts +7 -0
  172. package/esm/api/resources/media/client/requests/CreateUploadLinkMediaRequest.mjs +2 -0
  173. package/esm/api/resources/media/client/requests/DeleteMediaRequest.d.mts +9 -0
  174. package/esm/api/resources/media/client/requests/DeleteMediaRequest.mjs +2 -0
  175. package/esm/api/resources/media/client/requests/UploadMediaRequest.d.mts +13 -0
  176. package/esm/api/resources/media/client/requests/UploadMediaRequest.mjs +2 -0
  177. package/esm/api/resources/media/client/requests/index.d.mts +4 -0
  178. package/esm/api/resources/platforms/client/Client.d.mts +28 -0
  179. package/esm/api/resources/platforms/client/Client.mjs +74 -0
  180. package/esm/api/resources/platforms/client/index.d.mts +1 -0
  181. package/esm/api/resources/platforms/client/index.mjs +1 -0
  182. package/esm/api/resources/platforms/exports.d.mts +2 -0
  183. package/esm/api/resources/platforms/exports.mjs +3 -0
  184. package/esm/api/resources/platforms/index.d.mts +2 -0
  185. package/esm/api/resources/platforms/index.mjs +2 -0
  186. package/esm/api/resources/platforms/types/ListPlatformsResponse.d.mts +56 -0
  187. package/esm/api/resources/platforms/types/ListPlatformsResponse.mjs +21 -0
  188. package/esm/api/resources/platforms/types/index.d.mts +1 -0
  189. package/esm/api/resources/platforms/types/index.mjs +1 -0
  190. package/esm/api/resources/posts/client/Client.d.mts +22 -18
  191. package/esm/api/resources/posts/client/Client.mjs +30 -62
  192. package/esm/api/resources/posts/client/requests/ListPostsRequest.d.mts +1 -0
  193. package/esm/api/resources/posts/client/requests/PostCreate.d.mts +64 -0
  194. package/esm/api/resources/posts/client/requests/PostCreate.mjs +63 -0
  195. package/esm/api/resources/posts/client/requests/UpdatePostsRequest.d.mts +0 -2
  196. package/esm/api/resources/posts/client/requests/UpdatePostsRequest.mjs +0 -2
  197. package/esm/api/resources/posts/client/requests/index.d.mts +0 -1
  198. package/esm/api/resources/posts/types/CreatePostsResponse.d.mts +21 -0
  199. package/esm/api/resources/posts/types/CreatePostsResponse.mjs +21 -0
  200. package/esm/api/resources/posts/types/ListPostsRequestStatusesItem.d.mts +8 -0
  201. package/esm/api/resources/posts/types/ListPostsRequestStatusesItem.mjs +8 -0
  202. package/esm/api/resources/posts/types/index.d.mts +1 -0
  203. package/esm/api/resources/posts/types/index.mjs +1 -0
  204. package/esm/api/resources/socialAccounts/client/Client.d.mts +68 -1
  205. package/esm/api/resources/socialAccounts/client/Client.mjs +210 -4
  206. package/esm/api/resources/socialAccounts/client/requests/ListWhopCompaniesSocialAccountsRequest.d.mts +9 -0
  207. package/esm/api/resources/socialAccounts/client/requests/ListWhopCompaniesSocialAccountsRequest.mjs +2 -0
  208. package/esm/api/resources/socialAccounts/client/requests/ListWhopForumsSocialAccountsRequest.d.mts +11 -0
  209. package/esm/api/resources/socialAccounts/client/requests/ListWhopForumsSocialAccountsRequest.mjs +2 -0
  210. package/esm/api/resources/socialAccounts/client/requests/NextSlotsSocialAccountsRequest.d.mts +11 -0
  211. package/esm/api/resources/socialAccounts/client/requests/NextSlotsSocialAccountsRequest.mjs +2 -0
  212. package/esm/api/resources/socialAccounts/client/requests/index.d.mts +3 -0
  213. package/esm/api/resources/socialAccounts/types/ListSocialAccountsResponse.d.mts +22 -0
  214. package/esm/api/resources/socialAccounts/types/ListSocialAccountsResponse.mjs +21 -0
  215. package/esm/api/resources/socialAccounts/types/ListWhopCompaniesSocialAccountsResponse.d.mts +12 -0
  216. package/esm/api/resources/socialAccounts/types/ListWhopCompaniesSocialAccountsResponse.mjs +2 -0
  217. package/esm/api/resources/socialAccounts/types/ListWhopForumsSocialAccountsResponse.d.mts +12 -0
  218. package/esm/api/resources/socialAccounts/types/ListWhopForumsSocialAccountsResponse.mjs +2 -0
  219. package/esm/api/resources/socialAccounts/types/NextSlotsSocialAccountsResponse.d.mts +3 -0
  220. package/esm/api/resources/socialAccounts/types/NextSlotsSocialAccountsResponse.mjs +2 -0
  221. package/esm/api/resources/socialAccounts/types/index.d.mts +3 -0
  222. package/esm/api/resources/socialAccounts/types/index.mjs +3 -0
  223. package/esm/api/resources/tags/client/Client.d.mts +8 -0
  224. package/esm/api/resources/tags/client/Client.mjs +12 -3
  225. package/esm/api/resources/webhooks/client/Client.d.mts +155 -0
  226. package/esm/api/resources/webhooks/client/Client.mjs +501 -0
  227. package/esm/api/resources/webhooks/client/index.d.mts +1 -0
  228. package/esm/api/resources/webhooks/client/index.mjs +1 -0
  229. package/esm/api/resources/webhooks/client/requests/CreateWebhooksRequest.d.mts +24 -0
  230. package/esm/api/resources/webhooks/client/requests/CreateWebhooksRequest.mjs +13 -0
  231. package/esm/api/resources/webhooks/client/requests/DeleteWebhooksRequest.d.mts +9 -0
  232. package/esm/api/resources/webhooks/client/requests/DeleteWebhooksRequest.mjs +2 -0
  233. package/esm/api/resources/webhooks/client/requests/ListDeliveriesWebhooksRequest.d.mts +11 -0
  234. package/esm/api/resources/webhooks/client/requests/ListDeliveriesWebhooksRequest.mjs +2 -0
  235. package/esm/api/resources/webhooks/client/requests/RetrieveWebhooksRequest.d.mts +9 -0
  236. package/esm/api/resources/webhooks/client/requests/RetrieveWebhooksRequest.mjs +2 -0
  237. package/esm/api/resources/webhooks/client/requests/RotateSecretWebhooksRequest.d.mts +9 -0
  238. package/esm/api/resources/webhooks/client/requests/RotateSecretWebhooksRequest.mjs +2 -0
  239. package/esm/api/resources/webhooks/client/requests/TestWebhooksRequest.d.mts +9 -0
  240. package/esm/api/resources/webhooks/client/requests/TestWebhooksRequest.mjs +2 -0
  241. package/esm/api/resources/webhooks/client/requests/UpdateWebhooksRequest.d.mts +25 -0
  242. package/esm/api/resources/webhooks/client/requests/UpdateWebhooksRequest.mjs +13 -0
  243. package/esm/api/resources/webhooks/client/requests/index.d.mts +7 -0
  244. package/esm/api/resources/webhooks/client/requests/index.mjs +2 -0
  245. package/esm/api/resources/webhooks/exports.d.mts +2 -0
  246. package/esm/api/resources/webhooks/exports.mjs +3 -0
  247. package/esm/api/resources/webhooks/index.d.mts +1 -0
  248. package/esm/api/resources/webhooks/index.mjs +1 -0
  249. package/esm/api/types/OauthScope.d.mts +12 -0
  250. package/esm/api/types/OauthScope.mjs +12 -0
  251. package/esm/api/types/PostSearch.d.mts +12 -0
  252. package/esm/api/types/PostSearch.mjs +10 -0
  253. package/esm/api/types/PostWithRelations.d.mts +21 -0
  254. package/esm/api/types/PostWithRelations.mjs +21 -0
  255. package/esm/api/types/SocialAccountDisconnectedReason.d.mts +1 -0
  256. package/esm/api/types/SocialAccountDisconnectedReason.mjs +1 -0
  257. package/esm/api/types/SocialPlatform.d.mts +21 -0
  258. package/esm/api/types/SocialPlatform.mjs +21 -0
  259. package/esm/core/exports.d.mts +1 -0
  260. package/esm/core/exports.mjs +1 -0
  261. package/esm/core/fetcher/Fetcher.mjs +1 -84
  262. package/esm/core/fetcher/makePassthroughRequest.mjs +26 -4
  263. package/esm/core/fetcher/redactUrl.d.mts +2 -0
  264. package/esm/core/fetcher/redactUrl.mjs +84 -0
  265. package/esm/core/file/exports.d.mts +1 -0
  266. package/esm/core/file/exports.mjs +1 -0
  267. package/esm/core/file/file.d.mts +10 -0
  268. package/esm/core/file/file.mjs +188 -0
  269. package/esm/core/file/index.d.mts +2 -0
  270. package/esm/core/file/index.mjs +2 -0
  271. package/esm/core/file/types.d.mts +66 -0
  272. package/esm/core/file/types.mjs +1 -0
  273. package/esm/core/form-data-utils/FormDataWrapper.d.mts +15 -0
  274. package/esm/core/form-data-utils/FormDataWrapper.mjs +150 -0
  275. package/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
  276. package/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
  277. package/esm/core/form-data-utils/index.d.mts +2 -0
  278. package/esm/core/form-data-utils/index.mjs +2 -0
  279. package/esm/core/index.d.mts +2 -0
  280. package/esm/core/index.mjs +2 -0
  281. package/esm/core/requestBody.d.mts +12 -0
  282. package/esm/core/requestBody.mjs +23 -0
  283. package/esm/core/runtime/index.d.mts +1 -1
  284. package/esm/core/runtime/index.mjs +1 -1
  285. package/esm/core/runtime/runtime.d.mts +19 -0
  286. package/esm/core/runtime/runtime.mjs +73 -2
  287. package/esm/core/url/qs.mjs +2 -2
  288. package/esm/errors/SchedulinError.d.mts +1 -0
  289. package/esm/errors/SchedulinError.mjs +4 -0
  290. package/esm/errors/SchedulinTimeoutError.d.mts +2 -2
  291. package/esm/errors/SchedulinTimeoutError.mjs +6 -5
  292. package/package.json +1 -1
  293. /package/cjs/api/resources/{posts/client/requests/GetJobStatusPostsRequest.js → ai/client/requests/GetGenerationAiRequest.js} +0 -0
  294. /package/esm/api/resources/{posts/client/requests/GetJobStatusPostsRequest.mjs → ai/client/requests/GetGenerationAiRequest.mjs} +0 -0
@@ -0,0 +1,28 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as Schedulin from "../../../index.mjs";
5
+ export declare namespace PlatformsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class PlatformsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<PlatformsClient.Options>;
12
+ constructor(options: PlatformsClient.Options);
13
+ /**
14
+ * Per-platform posting requirements: caption length limits, media count/type rules, whether `platformConfiguration` is required, its JSON Schema when server-validated, and helper endpoints for fetching dynamic values (e.g. Pinterest boards). Platforms marked `comingSoon` cannot be posted to yet.
15
+ *
16
+ * @param {PlatformsClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link Schedulin.UnauthorizedError}
19
+ * @throws {@link Schedulin.InternalServerError}
20
+ * @throws {@link errors.SchedulinError}
21
+ * @throws {@link errors.SchedulinTimeoutError}
22
+ *
23
+ * @example
24
+ * await client.platforms.list()
25
+ */
26
+ list(requestOptions?: PlatformsClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListPlatformsResponse>;
27
+ private __list;
28
+ }
@@ -0,0 +1,74 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
+ import * as errors from "../../../../errors/index.mjs";
17
+ import * as Schedulin from "../../../index.mjs";
18
+ export class PlatformsClient {
19
+ constructor(options) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * Per-platform posting requirements: caption length limits, media count/type rules, whether `platformConfiguration` is required, its JSON Schema when server-validated, and helper endpoints for fetching dynamic values (e.g. Pinterest boards). Platforms marked `comingSoon` cannot be posted to yet.
24
+ *
25
+ * @param {PlatformsClient.RequestOptions} requestOptions - Request-specific configuration.
26
+ *
27
+ * @throws {@link Schedulin.UnauthorizedError}
28
+ * @throws {@link Schedulin.InternalServerError}
29
+ * @throws {@link errors.SchedulinError}
30
+ * @throws {@link errors.SchedulinTimeoutError}
31
+ *
32
+ * @example
33
+ * await client.platforms.list()
34
+ */
35
+ list(requestOptions) {
36
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
37
+ }
38
+ __list(requestOptions) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
42
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
43
+ const _response = yield core.fetcher({
44
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchedulinEnvironment.Default, "v0/platforms"),
45
+ method: "GET",
46
+ headers: _headers,
47
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
48
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
49
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
50
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
51
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
52
+ logging: this._options.logging,
53
+ });
54
+ if (_response.ok) {
55
+ return { data: _response.body, rawResponse: _response.rawResponse };
56
+ }
57
+ if (_response.error.reason === "status-code") {
58
+ switch (_response.error.statusCode) {
59
+ case 401:
60
+ throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
61
+ case 500:
62
+ throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
63
+ default:
64
+ throw new errors.SchedulinError({
65
+ statusCode: _response.error.statusCode,
66
+ body: _response.error.body,
67
+ rawResponse: _response.rawResponse,
68
+ });
69
+ }
70
+ }
71
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/platforms");
72
+ });
73
+ }
74
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { PlatformsClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { PlatformsClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,56 @@
1
+ export interface ListPlatformsResponse {
2
+ data: ListPlatformsResponse.Data.Item[];
3
+ }
4
+ export declare namespace ListPlatformsResponse {
5
+ type Data = Data.Item[];
6
+ namespace Data {
7
+ interface Item {
8
+ platform: string;
9
+ name: string;
10
+ comingSoon?: boolean | undefined;
11
+ captionMaxLength?: number | undefined;
12
+ mediaRules?: Item.MediaRules | undefined;
13
+ platformConfiguration: Item.PlatformConfiguration;
14
+ helperEndpoints?: Item.HelperEndpoints.Item[] | undefined;
15
+ }
16
+ namespace Item {
17
+ interface MediaRules {
18
+ min?: number | undefined;
19
+ max: number;
20
+ allowedTypes?: MediaRules.AllowedTypes.Item[] | undefined;
21
+ allowedDimensions?: MediaRules.AllowedDimensions.Item[] | undefined;
22
+ }
23
+ namespace MediaRules {
24
+ type AllowedTypes = AllowedTypes.Item[];
25
+ namespace AllowedTypes {
26
+ const Item: {
27
+ readonly Image: "IMAGE";
28
+ readonly Video: "VIDEO";
29
+ readonly Gif: "GIF";
30
+ };
31
+ type Item = (typeof Item)[keyof typeof Item];
32
+ }
33
+ type AllowedDimensions = AllowedDimensions.Item[];
34
+ namespace AllowedDimensions {
35
+ interface Item {
36
+ width: number;
37
+ height: number;
38
+ }
39
+ }
40
+ }
41
+ interface PlatformConfiguration {
42
+ required: boolean;
43
+ validated: boolean;
44
+ schema?: Record<string, unknown> | undefined;
45
+ }
46
+ type HelperEndpoints = HelperEndpoints.Item[];
47
+ namespace HelperEndpoints {
48
+ interface Item {
49
+ method: string;
50
+ path: string;
51
+ description: string;
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,21 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var ListPlatformsResponse;
3
+ (function (ListPlatformsResponse) {
4
+ let Data;
5
+ (function (Data) {
6
+ let Item;
7
+ (function (Item_1) {
8
+ let MediaRules;
9
+ (function (MediaRules) {
10
+ let AllowedTypes;
11
+ (function (AllowedTypes) {
12
+ AllowedTypes.Item = {
13
+ Image: "IMAGE",
14
+ Video: "VIDEO",
15
+ Gif: "GIF",
16
+ };
17
+ })(AllowedTypes = MediaRules.AllowedTypes || (MediaRules.AllowedTypes = {}));
18
+ })(MediaRules = Item_1.MediaRules || (Item_1.MediaRules = {}));
19
+ })(Item = Data.Item || (Data.Item = {}));
20
+ })(Data = ListPlatformsResponse.Data || (ListPlatformsResponse.Data = {}));
21
+ })(ListPlatformsResponse || (ListPlatformsResponse = {}));
@@ -0,0 +1 @@
1
+ export * from "./ListPlatformsResponse.mjs";
@@ -0,0 +1 @@
1
+ export * from "./ListPlatformsResponse.mjs";
@@ -18,6 +18,8 @@ export declare class PostsClient {
18
18
  *
19
19
  * @throws {@link Schedulin.UnauthorizedError}
20
20
  * @throws {@link Schedulin.InternalServerError}
21
+ * @throws {@link errors.SchedulinError}
22
+ * @throws {@link errors.SchedulinTimeoutError}
21
23
  *
22
24
  * @example
23
25
  * await client.posts.list()
@@ -25,13 +27,15 @@ export declare class PostsClient {
25
27
  list(request?: Schedulin.ListPostsRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListPostsResponse>;
26
28
  private __list;
27
29
  /**
28
- * Create a new post with media, tags, and scheduling options
30
+ * Create a new post with media, tags, and scheduling options. Media items may reference a stored library URL or any publicly reachable image/video URL — external URLs are downloaded into the media library automatically, so clients that cannot issue a raw presigned PUT can attach media in one call.
29
31
  *
30
32
  * @param {Schedulin.PostCreate} request
31
33
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
32
34
  *
33
35
  * @throws {@link Schedulin.UnauthorizedError}
34
36
  * @throws {@link Schedulin.InternalServerError}
37
+ * @throws {@link errors.SchedulinError}
38
+ * @throws {@link errors.SchedulinTimeoutError}
35
39
  *
36
40
  * @example
37
41
  * await client.posts.create({
@@ -49,6 +53,8 @@ export declare class PostsClient {
49
53
  *
50
54
  * @throws {@link Schedulin.UnauthorizedError}
51
55
  * @throws {@link Schedulin.InternalServerError}
56
+ * @throws {@link errors.SchedulinError}
57
+ * @throws {@link errors.SchedulinTimeoutError}
52
58
  *
53
59
  * @example
54
60
  * await client.posts.countByTab()
@@ -63,6 +69,8 @@ export declare class PostsClient {
63
69
  *
64
70
  * @throws {@link Schedulin.UnauthorizedError}
65
71
  * @throws {@link Schedulin.InternalServerError}
72
+ * @throws {@link errors.SchedulinError}
73
+ * @throws {@link errors.SchedulinTimeoutError}
66
74
  *
67
75
  * @example
68
76
  * await client.posts.retrieve({
@@ -72,13 +80,15 @@ export declare class PostsClient {
72
80
  retrieve(request: Schedulin.RetrievePostsRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<Schedulin.PostWithRelations>;
73
81
  private __retrieve;
74
82
  /**
75
- * Update an existing post by its ID
83
+ * Update an existing draft or scheduled post by its ID. `status` may be DRAFT, SCHEDULED (requires a future `scheduledAt`, either in this request or already on the post), or PROCESSING (publish now). COMPLETED and FAILED are set only by the publisher. Posts that are already publishing, published, or failed can't be edited (409).
76
84
  *
77
85
  * @param {Schedulin.UpdatePostsRequest} request
78
86
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
79
87
  *
80
88
  * @throws {@link Schedulin.UnauthorizedError}
81
89
  * @throws {@link Schedulin.InternalServerError}
90
+ * @throws {@link errors.SchedulinError}
91
+ * @throws {@link errors.SchedulinTimeoutError}
82
92
  *
83
93
  * @example
84
94
  * await client.posts.update({
@@ -95,6 +105,8 @@ export declare class PostsClient {
95
105
  *
96
106
  * @throws {@link Schedulin.UnauthorizedError}
97
107
  * @throws {@link Schedulin.InternalServerError}
108
+ * @throws {@link errors.SchedulinError}
109
+ * @throws {@link errors.SchedulinTimeoutError}
98
110
  *
99
111
  * @example
100
112
  * await client.posts.delete({
@@ -111,6 +123,8 @@ export declare class PostsClient {
111
123
  *
112
124
  * @throws {@link Schedulin.UnauthorizedError}
113
125
  * @throws {@link Schedulin.InternalServerError}
126
+ * @throws {@link errors.SchedulinError}
127
+ * @throws {@link errors.SchedulinTimeoutError}
114
128
  *
115
129
  * @example
116
130
  * await client.posts.analyticsSummary({
@@ -127,6 +141,8 @@ export declare class PostsClient {
127
141
  *
128
142
  * @throws {@link Schedulin.UnauthorizedError}
129
143
  * @throws {@link Schedulin.InternalServerError}
144
+ * @throws {@link errors.SchedulinError}
145
+ * @throws {@link errors.SchedulinTimeoutError}
130
146
  *
131
147
  * @example
132
148
  * await client.posts.analyticsSeries({
@@ -143,6 +159,8 @@ export declare class PostsClient {
143
159
  *
144
160
  * @throws {@link Schedulin.UnauthorizedError}
145
161
  * @throws {@link Schedulin.InternalServerError}
162
+ * @throws {@link errors.SchedulinError}
163
+ * @throws {@link errors.SchedulinTimeoutError}
146
164
  *
147
165
  * @example
148
166
  * await client.posts.publishDraft({
@@ -159,6 +177,8 @@ export declare class PostsClient {
159
177
  *
160
178
  * @throws {@link Schedulin.UnauthorizedError}
161
179
  * @throws {@link Schedulin.InternalServerError}
180
+ * @throws {@link errors.SchedulinError}
181
+ * @throws {@link errors.SchedulinTimeoutError}
162
182
  *
163
183
  * @example
164
184
  * await client.posts.updateTags({
@@ -168,20 +188,4 @@ export declare class PostsClient {
168
188
  */
169
189
  updateTags(request: Schedulin.UpdateTagsPostsRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<Schedulin.Post>;
170
190
  private __updateTags;
171
- /**
172
- * Retrieve the processing job status and logs for a post
173
- *
174
- * @param {Schedulin.GetJobStatusPostsRequest} request
175
- * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
176
- *
177
- * @throws {@link Schedulin.UnauthorizedError}
178
- * @throws {@link Schedulin.InternalServerError}
179
- *
180
- * @example
181
- * await client.posts.getJobStatus({
182
- * id: "id"
183
- * })
184
- */
185
- getJobStatus(request: Schedulin.GetJobStatusPostsRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<unknown | null>;
186
- private __getJobStatus;
187
191
  }
@@ -22,6 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
23
  import { mergeHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
+ import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
25
26
  import * as environments from "../../../../environments.mjs";
26
27
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
27
28
  import * as errors from "../../../../errors/index.mjs";
@@ -38,6 +39,8 @@ export class PostsClient {
38
39
  *
39
40
  * @throws {@link Schedulin.UnauthorizedError}
40
41
  * @throws {@link Schedulin.InternalServerError}
42
+ * @throws {@link errors.SchedulinError}
43
+ * @throws {@link errors.SchedulinTimeoutError}
41
44
  *
42
45
  * @example
43
46
  * await client.posts.list()
@@ -48,10 +51,11 @@ export class PostsClient {
48
51
  __list() {
49
52
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
50
53
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
51
- const { page, status, approvalStatus, scheduledAt, tagIds, tagMode, socialAccountIds, limit } = request;
54
+ const { page, status, statuses, approvalStatus, scheduledAt, tagIds, tagMode, socialAccountIds, limit } = request;
52
55
  const _queryParams = {
53
56
  page,
54
57
  status: status != null ? status : undefined,
58
+ statuses: Array.isArray(statuses) ? statuses.map((item) => item) : statuses != null ? statuses : undefined,
55
59
  approvalStatus: approvalStatus != null ? approvalStatus : undefined,
56
60
  scheduledAt,
57
61
  tagIds,
@@ -97,13 +101,15 @@ export class PostsClient {
97
101
  });
98
102
  }
99
103
  /**
100
- * Create a new post with media, tags, and scheduling options
104
+ * Create a new post with media, tags, and scheduling options. Media items may reference a stored library URL or any publicly reachable image/video URL — external URLs are downloaded into the media library automatically, so clients that cannot issue a raw presigned PUT can attach media in one call.
101
105
  *
102
106
  * @param {Schedulin.PostCreate} request
103
107
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
104
108
  *
105
109
  * @throws {@link Schedulin.UnauthorizedError}
106
110
  * @throws {@link Schedulin.InternalServerError}
111
+ * @throws {@link errors.SchedulinError}
112
+ * @throws {@link errors.SchedulinTimeoutError}
107
113
  *
108
114
  * @example
109
115
  * await client.posts.create({
@@ -126,7 +132,7 @@ export class PostsClient {
126
132
  contentType: "application/json",
127
133
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
128
134
  requestType: "json",
129
- body: request,
135
+ body: mergeAdditionalBodyParameters(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
130
136
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
131
137
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
132
138
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -161,6 +167,8 @@ export class PostsClient {
161
167
  *
162
168
  * @throws {@link Schedulin.UnauthorizedError}
163
169
  * @throws {@link Schedulin.InternalServerError}
170
+ * @throws {@link errors.SchedulinError}
171
+ * @throws {@link errors.SchedulinTimeoutError}
164
172
  *
165
173
  * @example
166
174
  * await client.posts.countByTab()
@@ -220,6 +228,8 @@ export class PostsClient {
220
228
  *
221
229
  * @throws {@link Schedulin.UnauthorizedError}
222
230
  * @throws {@link Schedulin.InternalServerError}
231
+ * @throws {@link errors.SchedulinError}
232
+ * @throws {@link errors.SchedulinTimeoutError}
223
233
  *
224
234
  * @example
225
235
  * await client.posts.retrieve({
@@ -267,13 +277,15 @@ export class PostsClient {
267
277
  });
268
278
  }
269
279
  /**
270
- * Update an existing post by its ID
280
+ * Update an existing draft or scheduled post by its ID. `status` may be DRAFT, SCHEDULED (requires a future `scheduledAt`, either in this request or already on the post), or PROCESSING (publish now). COMPLETED and FAILED are set only by the publisher. Posts that are already publishing, published, or failed can't be edited (409).
271
281
  *
272
282
  * @param {Schedulin.UpdatePostsRequest} request
273
283
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
274
284
  *
275
285
  * @throws {@link Schedulin.UnauthorizedError}
276
286
  * @throws {@link Schedulin.InternalServerError}
287
+ * @throws {@link errors.SchedulinError}
288
+ * @throws {@link errors.SchedulinTimeoutError}
277
289
  *
278
290
  * @example
279
291
  * await client.posts.update({
@@ -296,7 +308,7 @@ export class PostsClient {
296
308
  contentType: "application/json",
297
309
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
298
310
  requestType: "json",
299
- body: _body,
311
+ body: mergeAdditionalBodyParameters(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
300
312
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
301
313
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
302
314
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -331,6 +343,8 @@ export class PostsClient {
331
343
  *
332
344
  * @throws {@link Schedulin.UnauthorizedError}
333
345
  * @throws {@link Schedulin.InternalServerError}
346
+ * @throws {@link errors.SchedulinError}
347
+ * @throws {@link errors.SchedulinTimeoutError}
334
348
  *
335
349
  * @example
336
350
  * await client.posts.delete({
@@ -353,7 +367,7 @@ export class PostsClient {
353
367
  contentType: "application/json",
354
368
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
355
369
  requestType: "json",
356
- body: _body,
370
+ body: mergeAdditionalBodyParameters(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
357
371
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
358
372
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
359
373
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -388,6 +402,8 @@ export class PostsClient {
388
402
  *
389
403
  * @throws {@link Schedulin.UnauthorizedError}
390
404
  * @throws {@link Schedulin.InternalServerError}
405
+ * @throws {@link errors.SchedulinError}
406
+ * @throws {@link errors.SchedulinTimeoutError}
391
407
  *
392
408
  * @example
393
409
  * await client.posts.analyticsSummary({
@@ -445,6 +461,8 @@ export class PostsClient {
445
461
  *
446
462
  * @throws {@link Schedulin.UnauthorizedError}
447
463
  * @throws {@link Schedulin.InternalServerError}
464
+ * @throws {@link errors.SchedulinError}
465
+ * @throws {@link errors.SchedulinTimeoutError}
448
466
  *
449
467
  * @example
450
468
  * await client.posts.analyticsSeries({
@@ -509,6 +527,8 @@ export class PostsClient {
509
527
  *
510
528
  * @throws {@link Schedulin.UnauthorizedError}
511
529
  * @throws {@link Schedulin.InternalServerError}
530
+ * @throws {@link errors.SchedulinError}
531
+ * @throws {@link errors.SchedulinTimeoutError}
512
532
  *
513
533
  * @example
514
534
  * await client.posts.publishDraft({
@@ -531,7 +551,7 @@ export class PostsClient {
531
551
  contentType: "application/json",
532
552
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
533
553
  requestType: "json",
534
- body: _body,
554
+ body: mergeAdditionalBodyParameters(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
535
555
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
536
556
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
537
557
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -566,6 +586,8 @@ export class PostsClient {
566
586
  *
567
587
  * @throws {@link Schedulin.UnauthorizedError}
568
588
  * @throws {@link Schedulin.InternalServerError}
589
+ * @throws {@link errors.SchedulinError}
590
+ * @throws {@link errors.SchedulinTimeoutError}
569
591
  *
570
592
  * @example
571
593
  * await client.posts.updateTags({
@@ -589,7 +611,7 @@ export class PostsClient {
589
611
  contentType: "application/json",
590
612
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
591
613
  requestType: "json",
592
- body: _body,
614
+ body: mergeAdditionalBodyParameters(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
593
615
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
594
616
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
595
617
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -616,58 +638,4 @@ export class PostsClient {
616
638
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v0/posts/{id}/tags");
617
639
  });
618
640
  }
619
- /**
620
- * Retrieve the processing job status and logs for a post
621
- *
622
- * @param {Schedulin.GetJobStatusPostsRequest} request
623
- * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
624
- *
625
- * @throws {@link Schedulin.UnauthorizedError}
626
- * @throws {@link Schedulin.InternalServerError}
627
- *
628
- * @example
629
- * await client.posts.getJobStatus({
630
- * id: "id"
631
- * })
632
- */
633
- getJobStatus(request, requestOptions) {
634
- return core.HttpResponsePromise.fromPromise(this.__getJobStatus(request, requestOptions));
635
- }
636
- __getJobStatus(request, requestOptions) {
637
- return __awaiter(this, void 0, void 0, function* () {
638
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
639
- const { id } = request;
640
- const _authRequest = yield this._options.authProvider.getAuthRequest();
641
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
642
- const _response = yield core.fetcher({
643
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchedulinEnvironment.Default, `v0/posts/${core.url.encodePathParam(id)}/jobs`),
644
- method: "GET",
645
- headers: _headers,
646
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
647
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
648
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
649
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
650
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
651
- logging: this._options.logging,
652
- });
653
- if (_response.ok) {
654
- return { data: _response.body, rawResponse: _response.rawResponse };
655
- }
656
- if (_response.error.reason === "status-code") {
657
- switch (_response.error.statusCode) {
658
- case 401:
659
- throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
660
- case 500:
661
- throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
662
- default:
663
- throw new errors.SchedulinError({
664
- statusCode: _response.error.statusCode,
665
- body: _response.error.body,
666
- rawResponse: _response.rawResponse,
667
- });
668
- }
669
- }
670
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/posts/{id}/jobs");
671
- });
672
- }
673
641
  }
@@ -6,6 +6,7 @@ import type * as Schedulin from "../../../../index.mjs";
6
6
  export interface ListPostsRequest {
7
7
  page?: number;
8
8
  status?: Schedulin.ListPostsRequestStatus;
9
+ statuses?: Schedulin.ListPostsRequestStatusesItem | Schedulin.ListPostsRequestStatusesItem[];
9
10
  approvalStatus?: Schedulin.ListPostsRequestApprovalStatus;
10
11
  scheduledAt?: Schedulin.ListPostsRequestScheduledAt;
11
12
  tagIds?: string | string[];