@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
package/README.md CHANGED
@@ -11,6 +11,7 @@ The Schedulin TypeScript library provides convenient access to the Schedulin API
11
11
  - [Environments](#environments)
12
12
  - [Request and Response Types](#request-and-response-types)
13
13
  - [Exception Handling](#exception-handling)
14
+ - [File Uploads](#file-uploads)
14
15
  - [Advanced](#advanced)
15
16
  - [Subpackage Exports](#subpackage-exports)
16
17
  - [Additional Headers](#additional-headers)
@@ -87,6 +88,50 @@ try {
87
88
  }
88
89
  ```
89
90
 
91
+ ## File Uploads
92
+
93
+ You can upload files using the client:
94
+
95
+ ```typescript
96
+ import { createReadStream } from "fs";
97
+ import * as fs from "fs";
98
+ import { SchedulinClient } from "./src/Client";
99
+
100
+ const client = new SchedulinClient({ apiKey: "YOUR_API_KEY" });
101
+ await client.media.upload({
102
+ file: fs.createReadStream("/path/to/your/file")
103
+ });
104
+ ```
105
+ The client accepts a variety of types for file upload parameters:
106
+ * Stream types: `fs.ReadStream`, `stream.Readable`, and `ReadableStream`
107
+ * Buffered types: `Buffer`, `Blob`, `File`, `ArrayBuffer`, `ArrayBufferView`, and `Uint8Array`
108
+
109
+ ### Metadata
110
+
111
+ You can configure metadata when uploading a file:
112
+ ```typescript
113
+ const file: Uploadable.WithMetadata = {
114
+ data: createReadStream("path/to/file"),
115
+ filename: "my-file", // optional
116
+ contentType: "audio/mpeg", // optional
117
+ contentLength: 1949, // optional
118
+ };
119
+ ```
120
+
121
+ Alternatively, you can upload a file directly from a file path:
122
+ ```typescript
123
+ const file : Uploadable.FromPath = {
124
+ path: "path/to/file",
125
+ filename: "my-file", // optional
126
+ contentType: "audio/mpeg", // optional
127
+ contentLength: 1949, // optional
128
+ };
129
+ ```
130
+
131
+ The metadata is used to set the `Content-Length`, `Content-Type`, and `Content-Disposition` headers. If not provided, the client will attempt to determine them automatically.
132
+ For example, `fs.ReadStream` has a `path` property which the SDK uses to retrieve the file size from the filesystem without loading it into memory.
133
+
134
+
90
135
  ## Advanced
91
136
 
92
137
  ### Subpackage Exports
@@ -16,6 +16,11 @@ export type BaseClientOptions = {
16
16
  fetch?: typeof fetch;
17
17
  /** Configure logging for the client. */
18
18
  logging?: core.logging.LogConfig | core.logging.Logger;
19
+ /** Default options for SSE stream reconnection behavior. Has no effect on non-resumable endpoints. */
20
+ stream?: {
21
+ reconnectionEnabled?: boolean;
22
+ maxReconnectionAttempts?: number;
23
+ };
19
24
  /** Override auth. Pass false to disable, a function returning auth headers, an AuthProvider, or auth options. */
20
25
  auth?: AuthOption;
21
26
  } & HeaderAuthProvider.AuthOptions;
@@ -28,8 +33,15 @@ export interface BaseRequestOptions {
28
33
  abortSignal?: AbortSignal;
29
34
  /** Additional query string parameters to include in the request. */
30
35
  queryParams?: Record<string, unknown>;
36
+ /** A dictionary containing additional parameters to spread into the request's body. */
37
+ additionalBodyParameters?: Record<string, unknown>;
31
38
  /** Additional headers to include in the request. */
32
39
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
40
+ /** Options for SSE stream reconnection behavior. Has no effect on non-resumable endpoints. */
41
+ stream?: {
42
+ reconnectionEnabled?: boolean;
43
+ maxReconnectionAttempts?: number;
44
+ };
33
45
  }
34
46
  export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
35
47
  logging: core.logging.Logger;
package/cjs/Client.d.ts CHANGED
@@ -1,7 +1,10 @@
1
+ import { AiClient } from "./api/resources/ai/client/Client.js";
1
2
  import { MediaClient } from "./api/resources/media/client/Client.js";
3
+ import { PlatformsClient } from "./api/resources/platforms/client/Client.js";
2
4
  import { PostsClient } from "./api/resources/posts/client/Client.js";
3
5
  import { SocialAccountsClient } from "./api/resources/socialAccounts/client/Client.js";
4
6
  import { TagsClient } from "./api/resources/tags/client/Client.js";
7
+ import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
5
8
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
6
9
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
7
10
  import * as core from "./core/index.js";
@@ -16,11 +19,17 @@ export declare class SchedulinClient {
16
19
  protected _socialAccounts: SocialAccountsClient | undefined;
17
20
  protected _tags: TagsClient | undefined;
18
21
  protected _media: MediaClient | undefined;
22
+ protected _platforms: PlatformsClient | undefined;
23
+ protected _ai: AiClient | undefined;
24
+ protected _webhooks: WebhooksClient | undefined;
19
25
  constructor(options: SchedulinClient.Options);
20
26
  get posts(): PostsClient;
21
27
  get socialAccounts(): SocialAccountsClient;
22
28
  get tags(): TagsClient;
23
29
  get media(): MediaClient;
30
+ get platforms(): PlatformsClient;
31
+ get ai(): AiClient;
32
+ get webhooks(): WebhooksClient;
24
33
  /**
25
34
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
26
35
  * This is useful for making requests to endpoints not yet supported in the SDK.
package/cjs/Client.js CHANGED
@@ -44,10 +44,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  };
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.SchedulinClient = void 0;
47
- const Client_js_1 = require("./api/resources/media/client/Client.js");
48
- const Client_js_2 = require("./api/resources/posts/client/Client.js");
49
- const Client_js_3 = require("./api/resources/socialAccounts/client/Client.js");
50
- const Client_js_4 = require("./api/resources/tags/client/Client.js");
47
+ const Client_js_1 = require("./api/resources/ai/client/Client.js");
48
+ const Client_js_2 = require("./api/resources/media/client/Client.js");
49
+ const Client_js_3 = require("./api/resources/platforms/client/Client.js");
50
+ const Client_js_4 = require("./api/resources/posts/client/Client.js");
51
+ const Client_js_5 = require("./api/resources/socialAccounts/client/Client.js");
52
+ const Client_js_6 = require("./api/resources/tags/client/Client.js");
53
+ const Client_js_7 = require("./api/resources/webhooks/client/Client.js");
51
54
  const BaseClient_js_1 = require("./BaseClient.js");
52
55
  const core = __importStar(require("./core/index.js"));
53
56
  class SchedulinClient {
@@ -56,19 +59,31 @@ class SchedulinClient {
56
59
  }
57
60
  get posts() {
58
61
  var _a;
59
- return ((_a = this._posts) !== null && _a !== void 0 ? _a : (this._posts = new Client_js_2.PostsClient(this._options)));
62
+ return ((_a = this._posts) !== null && _a !== void 0 ? _a : (this._posts = new Client_js_4.PostsClient(this._options)));
60
63
  }
61
64
  get socialAccounts() {
62
65
  var _a;
63
- return ((_a = this._socialAccounts) !== null && _a !== void 0 ? _a : (this._socialAccounts = new Client_js_3.SocialAccountsClient(this._options)));
66
+ return ((_a = this._socialAccounts) !== null && _a !== void 0 ? _a : (this._socialAccounts = new Client_js_5.SocialAccountsClient(this._options)));
64
67
  }
65
68
  get tags() {
66
69
  var _a;
67
- return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_js_4.TagsClient(this._options)));
70
+ return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_js_6.TagsClient(this._options)));
68
71
  }
69
72
  get media() {
70
73
  var _a;
71
- return ((_a = this._media) !== null && _a !== void 0 ? _a : (this._media = new Client_js_1.MediaClient(this._options)));
74
+ return ((_a = this._media) !== null && _a !== void 0 ? _a : (this._media = new Client_js_2.MediaClient(this._options)));
75
+ }
76
+ get platforms() {
77
+ var _a;
78
+ return ((_a = this._platforms) !== null && _a !== void 0 ? _a : (this._platforms = new Client_js_3.PlatformsClient(this._options)));
79
+ }
80
+ get ai() {
81
+ var _a;
82
+ return ((_a = this._ai) !== null && _a !== void 0 ? _a : (this._ai = new Client_js_1.AiClient(this._options)));
83
+ }
84
+ get webhooks() {
85
+ var _a;
86
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_7.WebhooksClient(this._options)));
72
87
  }
73
88
  /**
74
89
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -2,5 +2,6 @@ import type * as core from "../../core/index.js";
2
2
  import * as errors from "../../errors/index.js";
3
3
  import type * as Schedulin from "../index.js";
4
4
  export declare class InternalServerError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ErrorResponse;
5
6
  constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
6
7
  }
@@ -2,5 +2,6 @@ import type * as core from "../../core/index.js";
2
2
  import * as errors from "../../errors/index.js";
3
3
  import type * as Schedulin from "../index.js";
4
4
  export declare class UnauthorizedError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ErrorResponse;
5
6
  constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
6
7
  }
@@ -0,0 +1,49 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Schedulin from "../../../index.js";
5
+ export declare namespace AiClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AiClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AiClient.Options>;
12
+ constructor(options: AiClient.Options);
13
+ /**
14
+ * Submit an AI image generation job
15
+ *
16
+ * @param {Schedulin.GenerateImageAiRequest} request
17
+ * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link Schedulin.UnauthorizedError}
20
+ * @throws {@link Schedulin.InternalServerError}
21
+ * @throws {@link errors.SchedulinError}
22
+ * @throws {@link errors.SchedulinTimeoutError}
23
+ *
24
+ * @example
25
+ * await client.ai.generateImage({
26
+ * prompt: "prompt"
27
+ * })
28
+ */
29
+ generateImage(request: Schedulin.GenerateImageAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<unknown>;
30
+ private __generateImage;
31
+ /**
32
+ * Get the status and details of a generation job
33
+ *
34
+ * @param {Schedulin.GetGenerationAiRequest} request
35
+ * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Schedulin.UnauthorizedError}
38
+ * @throws {@link Schedulin.InternalServerError}
39
+ * @throws {@link errors.SchedulinError}
40
+ * @throws {@link errors.SchedulinTimeoutError}
41
+ *
42
+ * @example
43
+ * await client.ai.getGeneration({
44
+ * id: "id"
45
+ * })
46
+ */
47
+ getGeneration(request: Schedulin.GetGenerationAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<unknown>;
48
+ private __getGeneration;
49
+ }
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.AiClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const requestBody_js_1 = require("../../../../core/requestBody.js");
51
+ const environments = __importStar(require("../../../../environments.js"));
52
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
53
+ const errors = __importStar(require("../../../../errors/index.js"));
54
+ const Schedulin = __importStar(require("../../../index.js"));
55
+ class AiClient {
56
+ constructor(options) {
57
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
+ }
59
+ /**
60
+ * Submit an AI image generation job
61
+ *
62
+ * @param {Schedulin.GenerateImageAiRequest} request
63
+ * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Schedulin.UnauthorizedError}
66
+ * @throws {@link Schedulin.InternalServerError}
67
+ * @throws {@link errors.SchedulinError}
68
+ * @throws {@link errors.SchedulinTimeoutError}
69
+ *
70
+ * @example
71
+ * await client.ai.generateImage({
72
+ * prompt: "prompt"
73
+ * })
74
+ */
75
+ generateImage(request, requestOptions) {
76
+ return core.HttpResponsePromise.fromPromise(this.__generateImage(request, requestOptions));
77
+ }
78
+ __generateImage(request, requestOptions) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
81
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
82
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
83
+ const _response = yield core.fetcher({
84
+ 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/studio/generateImage"),
85
+ method: "POST",
86
+ headers: _headers,
87
+ contentType: "application/json",
88
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
89
+ requestType: "json",
90
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
91
+ 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,
92
+ 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,
93
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
94
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
95
+ logging: this._options.logging,
96
+ });
97
+ if (_response.ok) {
98
+ return { data: _response.body, rawResponse: _response.rawResponse };
99
+ }
100
+ if (_response.error.reason === "status-code") {
101
+ switch (_response.error.statusCode) {
102
+ case 401:
103
+ throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
104
+ case 500:
105
+ throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
106
+ default:
107
+ throw new errors.SchedulinError({
108
+ statusCode: _response.error.statusCode,
109
+ body: _response.error.body,
110
+ rawResponse: _response.rawResponse,
111
+ });
112
+ }
113
+ }
114
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/studio/generateImage");
115
+ });
116
+ }
117
+ /**
118
+ * Get the status and details of a generation job
119
+ *
120
+ * @param {Schedulin.GetGenerationAiRequest} request
121
+ * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Schedulin.UnauthorizedError}
124
+ * @throws {@link Schedulin.InternalServerError}
125
+ * @throws {@link errors.SchedulinError}
126
+ * @throws {@link errors.SchedulinTimeoutError}
127
+ *
128
+ * @example
129
+ * await client.ai.getGeneration({
130
+ * id: "id"
131
+ * })
132
+ */
133
+ getGeneration(request, requestOptions) {
134
+ return core.HttpResponsePromise.fromPromise(this.__getGeneration(request, requestOptions));
135
+ }
136
+ __getGeneration(request, requestOptions) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
139
+ const { id } = request;
140
+ const _queryParams = {
141
+ id,
142
+ };
143
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
144
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
145
+ const _response = yield core.fetcher({
146
+ 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/studio/getGeneration"),
147
+ method: "GET",
148
+ headers: _headers,
149
+ queryString: core.url
150
+ .queryBuilder()
151
+ .addMany(_queryParams)
152
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
153
+ .build(),
154
+ 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,
155
+ 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,
156
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
157
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
158
+ logging: this._options.logging,
159
+ });
160
+ if (_response.ok) {
161
+ return { data: _response.body, rawResponse: _response.rawResponse };
162
+ }
163
+ if (_response.error.reason === "status-code") {
164
+ switch (_response.error.statusCode) {
165
+ case 401:
166
+ throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
167
+ case 500:
168
+ throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
169
+ default:
170
+ throw new errors.SchedulinError({
171
+ statusCode: _response.error.statusCode,
172
+ body: _response.error.body,
173
+ rawResponse: _response.rawResponse,
174
+ });
175
+ }
176
+ }
177
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/studio/getGeneration");
178
+ });
179
+ }
180
+ }
181
+ exports.AiClient = AiClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * prompt: "prompt"
5
+ * }
6
+ */
7
+ export interface GenerateImageAiRequest {
8
+ prompt: string;
9
+ modelKey?: GenerateImageAiRequest.ModelKey;
10
+ width?: number;
11
+ height?: number;
12
+ }
13
+ export declare namespace GenerateImageAiRequest {
14
+ const ModelKey: {
15
+ readonly FluxSchnell: "flux_schnell";
16
+ readonly FluxDev: "flux_dev";
17
+ readonly FluxProUltra: "flux_pro_ultra";
18
+ };
19
+ type ModelKey = (typeof ModelKey)[keyof typeof ModelKey];
20
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.GenerateImageAiRequest = void 0;
5
+ var GenerateImageAiRequest;
6
+ (function (GenerateImageAiRequest) {
7
+ GenerateImageAiRequest.ModelKey = {
8
+ FluxSchnell: "flux_schnell",
9
+ FluxDev: "flux_dev",
10
+ FluxProUltra: "flux_pro_ultra",
11
+ };
12
+ })(GenerateImageAiRequest || (exports.GenerateImageAiRequest = GenerateImageAiRequest = {}));
@@ -4,6 +4,6 @@
4
4
  * id: "id"
5
5
  * }
6
6
  */
7
- export interface GetJobStatusPostsRequest {
7
+ export interface GetGenerationAiRequest {
8
8
  id: string;
9
9
  }
@@ -0,0 +1,2 @@
1
+ export { GenerateImageAiRequest } from "./GenerateImageAiRequest.js";
2
+ export type { GetGenerationAiRequest } from "./GetGenerationAiRequest.js";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenerateImageAiRequest = void 0;
4
+ var GenerateImageAiRequest_js_1 = require("./GenerateImageAiRequest.js");
5
+ Object.defineProperty(exports, "GenerateImageAiRequest", { enumerable: true, get: function () { return GenerateImageAiRequest_js_1.GenerateImageAiRequest; } });
@@ -0,0 +1,2 @@
1
+ export { AiClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AiClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "AiClient", { enumerable: true, get: function () { return Client_js_1.AiClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -1,6 +1,10 @@
1
+ export * from "./ai/client/requests/index.js";
2
+ export * as ai from "./ai/index.js";
1
3
  export * from "./media/client/requests/index.js";
2
4
  export * as media from "./media/index.js";
3
5
  export * from "./media/types/index.js";
6
+ export * as platforms from "./platforms/index.js";
7
+ export * from "./platforms/types/index.js";
4
8
  export * from "./posts/client/requests/index.js";
5
9
  export * as posts from "./posts/index.js";
6
10
  export * from "./posts/types/index.js";
@@ -10,3 +14,5 @@ export * from "./socialAccounts/types/index.js";
10
14
  export * from "./tags/client/requests/index.js";
11
15
  export * as tags from "./tags/index.js";
12
16
  export * from "./tags/types/index.js";
17
+ export * from "./webhooks/client/requests/index.js";
18
+ export * as webhooks from "./webhooks/index.js";
@@ -36,10 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tags = exports.socialAccounts = exports.posts = exports.media = void 0;
39
+ exports.webhooks = exports.tags = exports.socialAccounts = exports.posts = exports.platforms = exports.media = exports.ai = void 0;
40
+ __exportStar(require("./ai/client/requests/index.js"), exports);
41
+ exports.ai = __importStar(require("./ai/index.js"));
40
42
  __exportStar(require("./media/client/requests/index.js"), exports);
41
43
  exports.media = __importStar(require("./media/index.js"));
42
44
  __exportStar(require("./media/types/index.js"), exports);
45
+ exports.platforms = __importStar(require("./platforms/index.js"));
46
+ __exportStar(require("./platforms/types/index.js"), exports);
43
47
  __exportStar(require("./posts/client/requests/index.js"), exports);
44
48
  exports.posts = __importStar(require("./posts/index.js"));
45
49
  __exportStar(require("./posts/types/index.js"), exports);
@@ -49,3 +53,5 @@ __exportStar(require("./socialAccounts/types/index.js"), exports);
49
53
  __exportStar(require("./tags/client/requests/index.js"), exports);
50
54
  exports.tags = __importStar(require("./tags/index.js"));
51
55
  __exportStar(require("./tags/types/index.js"), exports);
56
+ __exportStar(require("./webhooks/client/requests/index.js"), exports);
57
+ exports.webhooks = __importStar(require("./webhooks/index.js"));