@ichos/sdk 1.0.8 → 1.0.10

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 (219) hide show
  1. package/dist/Client.d.ts +0 -3
  2. package/dist/Client.d.ts.map +1 -1
  3. package/dist/Client.js +0 -5
  4. package/dist/Client.js.map +1 -1
  5. package/dist/api/errors/ForbiddenError.d.ts +1 -1
  6. package/dist/api/errors/ForbiddenError.d.ts.map +1 -1
  7. package/dist/api/errors/ForbiddenError.js.map +1 -1
  8. package/dist/api/errors/TooManyRequestsError.d.ts +7 -0
  9. package/dist/api/errors/TooManyRequestsError.d.ts.map +1 -0
  10. package/dist/api/errors/TooManyRequestsError.js +18 -0
  11. package/dist/api/errors/TooManyRequestsError.js.map +1 -0
  12. package/dist/api/errors/index.d.ts +1 -0
  13. package/dist/api/errors/index.d.ts.map +1 -1
  14. package/dist/api/errors/index.js +1 -0
  15. package/dist/api/errors/index.js.map +1 -1
  16. package/dist/api/resources/ads/client/Client.d.ts +12 -0
  17. package/dist/api/resources/ads/client/Client.d.ts.map +1 -1
  18. package/dist/api/resources/ads/client/Client.js +36 -0
  19. package/dist/api/resources/ads/client/Client.js.map +1 -1
  20. package/dist/api/resources/audio/client/Client.d.ts +8 -1
  21. package/dist/api/resources/audio/client/Client.d.ts.map +1 -1
  22. package/dist/api/resources/audio/client/Client.js +22 -1
  23. package/dist/api/resources/audio/client/Client.js.map +1 -1
  24. package/dist/api/resources/episodes/client/Client.d.ts +14 -19
  25. package/dist/api/resources/episodes/client/Client.d.ts.map +1 -1
  26. package/dist/api/resources/episodes/client/Client.js +38 -60
  27. package/dist/api/resources/episodes/client/Client.js.map +1 -1
  28. package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts +0 -10
  29. package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts.map +1 -1
  30. package/dist/api/resources/episodes/client/requests/EpisodeCreate.js +0 -6
  31. package/dist/api/resources/episodes/client/requests/EpisodeCreate.js.map +1 -1
  32. package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts +1 -11
  33. package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts.map +1 -1
  34. package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js +0 -6
  35. package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js.map +1 -1
  36. package/dist/api/resources/episodes/client/requests/index.d.ts +0 -1
  37. package/dist/api/resources/episodes/client/requests/index.d.ts.map +1 -1
  38. package/dist/api/resources/index.d.ts +0 -2
  39. package/dist/api/resources/index.d.ts.map +1 -1
  40. package/dist/api/resources/index.js +0 -2
  41. package/dist/api/resources/index.js.map +1 -1
  42. package/dist/api/resources/organizations/client/Client.d.ts +3 -0
  43. package/dist/api/resources/organizations/client/Client.d.ts.map +1 -1
  44. package/dist/api/resources/organizations/client/Client.js +9 -0
  45. package/dist/api/resources/organizations/client/Client.js.map +1 -1
  46. package/dist/api/resources/podcasts/client/Client.d.ts +34 -19
  47. package/dist/api/resources/podcasts/client/Client.d.ts.map +1 -1
  48. package/dist/api/resources/podcasts/client/Client.js +100 -59
  49. package/dist/api/resources/podcasts/client/Client.js.map +1 -1
  50. package/dist/api/resources/podcasts/client/requests/GetAverageMonthlyListenersRequest.d.ts.map +1 -0
  51. package/dist/api/resources/podcasts/client/requests/GetAverageMonthlyListenersRequest.js.map +1 -0
  52. package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts +1 -0
  53. package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts.map +1 -1
  54. package/dist/api/resources/podcasts/client/requests/PodcastCreate.js.map +1 -1
  55. package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts +1 -0
  56. package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts.map +1 -1
  57. package/dist/api/resources/podcasts/client/requests/PodcastUpdate.js.map +1 -1
  58. package/dist/api/resources/podcasts/client/requests/index.d.ts +1 -1
  59. package/dist/api/resources/podcasts/client/requests/index.d.ts.map +1 -1
  60. package/dist/api/resources/segments/client/Client.js.map +1 -1
  61. package/dist/api/resources/users/client/Client.d.ts +5 -0
  62. package/dist/api/resources/users/client/Client.d.ts.map +1 -1
  63. package/dist/api/resources/users/client/Client.js +15 -0
  64. package/dist/api/resources/users/client/Client.js.map +1 -1
  65. package/dist/api/resources/webhooks/client/Client.d.ts +4 -0
  66. package/dist/api/resources/webhooks/client/Client.d.ts.map +1 -1
  67. package/dist/api/resources/webhooks/client/Client.js +12 -0
  68. package/dist/api/resources/webhooks/client/Client.js.map +1 -1
  69. package/dist/api/types/AudioUploadResponse.d.ts +3 -3
  70. package/dist/api/types/CoverUploadResponse.d.ts +2 -1
  71. package/dist/api/types/CoverUploadResponse.d.ts.map +1 -1
  72. package/dist/api/types/CoverUploadResponse.js.map +1 -1
  73. package/dist/api/types/Episode.d.ts +7 -0
  74. package/dist/api/types/Episode.d.ts.map +1 -1
  75. package/dist/api/types/Episode.js +5 -0
  76. package/dist/api/types/Episode.js.map +1 -1
  77. package/dist/api/types/EpisodeCreateResponse.d.ts +1 -1
  78. package/dist/api/types/EpisodeCreateResponse.d.ts.map +1 -1
  79. package/dist/api/types/{EpisodeCreatedResponseData.d.ts → EpisodeCreateResponseData.d.ts} +12 -5
  80. package/dist/api/types/EpisodeCreateResponseData.d.ts.map +1 -0
  81. package/dist/api/types/EpisodeCreateResponseData.js +21 -0
  82. package/dist/api/types/EpisodeCreateResponseData.js.map +1 -0
  83. package/dist/api/types/ForbiddenErrorBody.d.ts +6 -0
  84. package/dist/api/types/ForbiddenErrorBody.d.ts.map +1 -0
  85. package/dist/api/types/{StringOrNullResponse.js → ForbiddenErrorBody.js} +1 -1
  86. package/dist/api/types/ForbiddenErrorBody.js.map +1 -0
  87. package/dist/api/types/ForbiddenErrorResponse.d.ts +7 -0
  88. package/dist/api/types/ForbiddenErrorResponse.d.ts.map +1 -0
  89. package/dist/api/{resources/episodes/client/requests/GetEpisodeCoverRequest.js → types/ForbiddenErrorResponse.js} +1 -1
  90. package/dist/api/types/ForbiddenErrorResponse.js.map +1 -0
  91. package/dist/api/types/InternalServerErrorBody.d.ts +0 -3
  92. package/dist/api/types/InternalServerErrorBody.d.ts.map +1 -1
  93. package/dist/api/types/NotFoundErrorBody.d.ts +0 -3
  94. package/dist/api/types/NotFoundErrorBody.d.ts.map +1 -1
  95. package/dist/api/types/Podcast.d.ts +9 -0
  96. package/dist/api/types/Podcast.d.ts.map +1 -1
  97. package/dist/api/types/Podcast.js +6 -0
  98. package/dist/api/types/Podcast.js.map +1 -1
  99. package/dist/api/types/PodcastCreateResponse.d.ts +7 -0
  100. package/dist/api/types/PodcastCreateResponse.d.ts.map +1 -0
  101. package/dist/api/types/{RetrieveCoverResponse.js → PodcastCreateResponse.js} +1 -1
  102. package/dist/api/types/PodcastCreateResponse.js.map +1 -0
  103. package/dist/api/types/PodcastCreateResponseData.d.ts +79 -0
  104. package/dist/api/types/PodcastCreateResponseData.d.ts.map +1 -0
  105. package/dist/api/types/PodcastCreateResponseData.js +22 -0
  106. package/dist/api/types/PodcastCreateResponseData.js.map +1 -0
  107. package/dist/api/types/TooManyRequestsErrorBody.d.ts +7 -0
  108. package/dist/api/types/TooManyRequestsErrorBody.d.ts.map +1 -0
  109. package/dist/api/{resources/podcasts/client/requests/GetPodcastCoverRequest.js → types/TooManyRequestsErrorBody.js} +1 -1
  110. package/dist/api/types/TooManyRequestsErrorBody.js.map +1 -0
  111. package/dist/api/types/TooManyRequestsErrorResponse.d.ts +7 -0
  112. package/dist/api/types/TooManyRequestsErrorResponse.d.ts.map +1 -0
  113. package/dist/api/types/TooManyRequestsErrorResponse.js +3 -0
  114. package/dist/api/types/TooManyRequestsErrorResponse.js.map +1 -0
  115. package/dist/api/types/UnauthorizedErrorBody.d.ts +0 -3
  116. package/dist/api/types/UnauthorizedErrorBody.d.ts.map +1 -1
  117. package/dist/api/types/ValidationError.d.ts +8 -0
  118. package/dist/api/types/ValidationError.d.ts.map +1 -0
  119. package/dist/api/types/{UnauthenticatedError.js → ValidationError.js} +1 -1
  120. package/dist/api/types/ValidationError.js.map +1 -0
  121. package/dist/api/types/ValidationErrorResponse.d.ts +1 -1
  122. package/dist/api/types/ValidationErrorResponse.d.ts.map +1 -1
  123. package/dist/api/types/ValidationIssue.d.ts +1 -0
  124. package/dist/api/types/ValidationIssue.d.ts.map +1 -1
  125. package/dist/api/types/ValidationIssue.js +1 -0
  126. package/dist/api/types/ValidationIssue.js.map +1 -1
  127. package/dist/api/types/index.d.ts +8 -5
  128. package/dist/api/types/index.d.ts.map +1 -1
  129. package/dist/api/types/index.js +8 -5
  130. package/dist/api/types/index.js.map +1 -1
  131. package/package.json +1 -1
  132. package/src/Client.ts +0 -6
  133. package/src/api/errors/ForbiddenError.ts +1 -1
  134. package/src/api/errors/TooManyRequestsError.ts +22 -0
  135. package/src/api/errors/index.ts +1 -0
  136. package/src/api/resources/ads/client/Client.ts +84 -12
  137. package/src/api/resources/audio/client/Client.ts +43 -1
  138. package/src/api/resources/episodes/client/Client.ts +86 -107
  139. package/src/api/resources/episodes/client/requests/EpisodeCreate.ts +0 -10
  140. package/src/api/resources/episodes/client/requests/EpisodeUpdate.ts +1 -11
  141. package/src/api/resources/episodes/client/requests/index.ts +0 -1
  142. package/src/api/resources/index.ts +0 -2
  143. package/src/api/resources/organizations/client/Client.ts +21 -3
  144. package/src/api/resources/podcasts/client/Client.ts +190 -110
  145. package/src/api/resources/podcasts/client/requests/PodcastCreate.ts +1 -0
  146. package/src/api/resources/podcasts/client/requests/PodcastUpdate.ts +1 -0
  147. package/src/api/resources/podcasts/client/requests/index.ts +1 -1
  148. package/src/api/resources/segments/client/Client.ts +6 -6
  149. package/src/api/resources/users/client/Client.ts +35 -5
  150. package/src/api/resources/webhooks/client/Client.ts +28 -4
  151. package/src/api/types/AudioUploadResponse.ts +3 -3
  152. package/src/api/types/CoverUploadResponse.ts +2 -1
  153. package/src/api/types/Episode.ts +7 -0
  154. package/src/api/types/EpisodeCreateResponse.ts +1 -1
  155. package/src/api/types/{EpisodeCreatedResponseData.ts → EpisodeCreateResponseData.ts} +11 -4
  156. package/src/api/types/{UnauthenticatedError.ts → ForbiddenErrorBody.ts} +1 -4
  157. package/src/api/types/{UnauthenticatedErrorResponse.ts → ForbiddenErrorResponse.ts} +2 -2
  158. package/src/api/types/InternalServerErrorBody.ts +0 -3
  159. package/src/api/types/NotFoundErrorBody.ts +0 -3
  160. package/src/api/types/Podcast.ts +9 -0
  161. package/src/api/types/{StringOrNullResponse.ts → PodcastCreateResponse.ts} +2 -2
  162. package/src/api/types/PodcastCreateResponseData.ts +82 -0
  163. package/src/api/types/TooManyRequestsErrorBody.ts +8 -0
  164. package/src/api/types/TooManyRequestsErrorResponse.ts +9 -0
  165. package/src/api/types/UnauthorizedErrorBody.ts +0 -3
  166. package/src/api/types/ValidationError.ts +10 -0
  167. package/src/api/types/ValidationErrorResponse.ts +1 -1
  168. package/src/api/types/ValidationIssue.ts +1 -0
  169. package/src/api/types/index.ts +8 -5
  170. package/dist/api/resources/analytics/client/Client.d.ts +0 -29
  171. package/dist/api/resources/analytics/client/Client.d.ts.map +0 -1
  172. package/dist/api/resources/analytics/client/Client.js +0 -69
  173. package/dist/api/resources/analytics/client/Client.js.map +0 -1
  174. package/dist/api/resources/analytics/client/index.d.ts +0 -2
  175. package/dist/api/resources/analytics/client/index.d.ts.map +0 -1
  176. package/dist/api/resources/analytics/client/index.js +0 -2
  177. package/dist/api/resources/analytics/client/index.js.map +0 -1
  178. package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.d.ts.map +0 -1
  179. package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.js.map +0 -1
  180. package/dist/api/resources/analytics/client/requests/index.d.ts +0 -2
  181. package/dist/api/resources/analytics/client/requests/index.d.ts.map +0 -1
  182. package/dist/api/resources/analytics/client/requests/index.js +0 -2
  183. package/dist/api/resources/analytics/client/requests/index.js.map +0 -1
  184. package/dist/api/resources/analytics/index.d.ts +0 -2
  185. package/dist/api/resources/analytics/index.d.ts.map +0 -1
  186. package/dist/api/resources/analytics/index.js +0 -2
  187. package/dist/api/resources/analytics/index.js.map +0 -1
  188. package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.d.ts +0 -11
  189. package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.d.ts.map +0 -1
  190. package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.js.map +0 -1
  191. package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.d.ts +0 -11
  192. package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.d.ts.map +0 -1
  193. package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.js.map +0 -1
  194. package/dist/api/types/EpisodeCreatedResponseData.d.ts.map +0 -1
  195. package/dist/api/types/EpisodeCreatedResponseData.js +0 -16
  196. package/dist/api/types/EpisodeCreatedResponseData.js.map +0 -1
  197. package/dist/api/types/RetrieveCoverResponse.d.ts +0 -12
  198. package/dist/api/types/RetrieveCoverResponse.d.ts.map +0 -1
  199. package/dist/api/types/RetrieveCoverResponse.js.map +0 -1
  200. package/dist/api/types/StringOrNullResponse.d.ts +0 -7
  201. package/dist/api/types/StringOrNullResponse.d.ts.map +0 -1
  202. package/dist/api/types/StringOrNullResponse.js.map +0 -1
  203. package/dist/api/types/UnauthenticatedError.d.ts +0 -9
  204. package/dist/api/types/UnauthenticatedError.d.ts.map +0 -1
  205. package/dist/api/types/UnauthenticatedError.js.map +0 -1
  206. package/dist/api/types/UnauthenticatedErrorResponse.d.ts +0 -7
  207. package/dist/api/types/UnauthenticatedErrorResponse.d.ts.map +0 -1
  208. package/dist/api/types/UnauthenticatedErrorResponse.js +0 -3
  209. package/dist/api/types/UnauthenticatedErrorResponse.js.map +0 -1
  210. package/src/api/resources/analytics/client/Client.ts +0 -110
  211. package/src/api/resources/analytics/client/index.ts +0 -1
  212. package/src/api/resources/analytics/client/requests/index.ts +0 -1
  213. package/src/api/resources/analytics/index.ts +0 -1
  214. package/src/api/resources/episodes/client/requests/GetEpisodeCoverRequest.ts +0 -12
  215. package/src/api/resources/podcasts/client/requests/GetPodcastCoverRequest.ts +0 -12
  216. package/src/api/types/RetrieveCoverResponse.ts +0 -15
  217. /package/dist/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.d.ts +0 -0
  218. /package/dist/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.js +0 -0
  219. /package/src/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.ts +0 -0
@@ -30,6 +30,7 @@ export class AudioClient {
30
30
  * @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
31
31
  *
32
32
  * @throws {@link Ichos.UnauthorizedError}
33
+ * @throws {@link Ichos.TooManyRequestsError}
33
34
  * @throws {@link Ichos.InternalServerError}
34
35
  *
35
36
  * @example
@@ -85,6 +86,11 @@ export class AudioClient {
85
86
  _response.error.body as Ichos.UnauthorizedErrorResponse,
86
87
  _response.rawResponse,
87
88
  );
89
+ case 429:
90
+ throw new Ichos.TooManyRequestsError(
91
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
92
+ _response.rawResponse,
93
+ );
88
94
  case 500:
89
95
  throw new Ichos.InternalServerError(
90
96
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -109,6 +115,7 @@ export class AudioClient {
109
115
  * @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
110
116
  *
111
117
  * @throws {@link Ichos.UnauthorizedError}
118
+ * @throws {@link Ichos.TooManyRequestsError}
112
119
  * @throws {@link Ichos.InternalServerError}
113
120
  *
114
121
  * @example
@@ -157,6 +164,11 @@ export class AudioClient {
157
164
  _response.error.body as Ichos.UnauthorizedErrorResponse,
158
165
  _response.rawResponse,
159
166
  );
167
+ case 429:
168
+ throw new Ichos.TooManyRequestsError(
169
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
170
+ _response.rawResponse,
171
+ );
160
172
  case 500:
161
173
  throw new Ichos.InternalServerError(
162
174
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -182,6 +194,7 @@ export class AudioClient {
182
194
  *
183
195
  * @throws {@link Ichos.UnauthorizedError}
184
196
  * @throws {@link Ichos.NotFoundError}
197
+ * @throws {@link Ichos.TooManyRequestsError}
185
198
  * @throws {@link Ichos.InternalServerError}
186
199
  *
187
200
  * @example
@@ -240,6 +253,11 @@ export class AudioClient {
240
253
  _response.error.body as Ichos.NotFoundErrorResponse,
241
254
  _response.rawResponse,
242
255
  );
256
+ case 429:
257
+ throw new Ichos.TooManyRequestsError(
258
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
259
+ _response.rawResponse,
260
+ );
243
261
  case 500:
244
262
  throw new Ichos.InternalServerError(
245
263
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -259,12 +277,13 @@ export class AudioClient {
259
277
 
260
278
  /**
261
279
  * Finalize the creation of an audio resource after the file has been uploaded.
262
- * Call this endpoint after successfully uploading the file to the URL returned by /put.
280
+ * Upload completion is detected via storage events.
263
281
  *
264
282
  * @param {Ichos.FinalizeAudioUploadRequest} request
265
283
  * @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
266
284
  *
267
285
  * @throws {@link Ichos.UnauthorizedError}
286
+ * @throws {@link Ichos.TooManyRequestsError}
268
287
  * @throws {@link Ichos.InternalServerError}
269
288
  *
270
289
  * @example
@@ -325,6 +344,11 @@ export class AudioClient {
325
344
  _response.error.body as Ichos.UnauthorizedErrorResponse,
326
345
  _response.rawResponse,
327
346
  );
347
+ case 429:
348
+ throw new Ichos.TooManyRequestsError(
349
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
350
+ _response.rawResponse,
351
+ );
328
352
  case 500:
329
353
  throw new Ichos.InternalServerError(
330
354
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -350,6 +374,7 @@ export class AudioClient {
350
374
  *
351
375
  * @throws {@link Ichos.UnauthorizedError}
352
376
  * @throws {@link Ichos.NotFoundError}
377
+ * @throws {@link Ichos.TooManyRequestsError}
353
378
  * @throws {@link Ichos.InternalServerError}
354
379
  *
355
380
  * @example
@@ -408,6 +433,11 @@ export class AudioClient {
408
433
  _response.error.body as Ichos.NotFoundErrorResponse,
409
434
  _response.rawResponse,
410
435
  );
436
+ case 429:
437
+ throw new Ichos.TooManyRequestsError(
438
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
439
+ _response.rawResponse,
440
+ );
411
441
  case 500:
412
442
  throw new Ichos.InternalServerError(
413
443
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -433,6 +463,7 @@ export class AudioClient {
433
463
  *
434
464
  * @throws {@link Ichos.UnauthorizedError}
435
465
  * @throws {@link Ichos.NotFoundError}
466
+ * @throws {@link Ichos.TooManyRequestsError}
436
467
  * @throws {@link Ichos.InternalServerError}
437
468
  *
438
469
  * @example
@@ -491,6 +522,11 @@ export class AudioClient {
491
522
  _response.error.body as Ichos.NotFoundErrorResponse,
492
523
  _response.rawResponse,
493
524
  );
525
+ case 429:
526
+ throw new Ichos.TooManyRequestsError(
527
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
528
+ _response.rawResponse,
529
+ );
494
530
  case 500:
495
531
  throw new Ichos.InternalServerError(
496
532
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -513,6 +549,7 @@ export class AudioClient {
513
549
  * @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
514
550
  *
515
551
  * @throws {@link Ichos.UnauthorizedError}
552
+ * @throws {@link Ichos.TooManyRequestsError}
516
553
  * @throws {@link Ichos.InternalServerError}
517
554
  *
518
555
  * @example
@@ -568,6 +605,11 @@ export class AudioClient {
568
605
  _response.error.body as Ichos.UnauthorizedErrorResponse,
569
606
  _response.rawResponse,
570
607
  );
608
+ case 429:
609
+ throw new Ichos.TooManyRequestsError(
610
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
611
+ _response.rawResponse,
612
+ );
571
613
  case 500:
572
614
  throw new Ichos.InternalServerError(
573
615
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -31,6 +31,7 @@ export class EpisodesClient {
31
31
  * @throws {@link Ichos.UnauthorizedError}
32
32
  * @throws {@link Ichos.ForbiddenError}
33
33
  * @throws {@link Ichos.NotFoundError}
34
+ * @throws {@link Ichos.TooManyRequestsError}
34
35
  * @throws {@link Ichos.InternalServerError}
35
36
  *
36
37
  * @example
@@ -88,7 +89,7 @@ export class EpisodesClient {
88
89
  );
89
90
  case 403:
90
91
  throw new Ichos.ForbiddenError(
91
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
92
+ _response.error.body as Ichos.ForbiddenErrorResponse,
92
93
  _response.rawResponse,
93
94
  );
94
95
  case 404:
@@ -96,6 +97,11 @@ export class EpisodesClient {
96
97
  _response.error.body as Ichos.NotFoundErrorResponse,
97
98
  _response.rawResponse,
98
99
  );
100
+ case 429:
101
+ throw new Ichos.TooManyRequestsError(
102
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
103
+ _response.rawResponse,
104
+ );
99
105
  case 500:
100
106
  throw new Ichos.InternalServerError(
101
107
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -122,6 +128,7 @@ export class EpisodesClient {
122
128
  * @throws {@link Ichos.UnauthorizedError}
123
129
  * @throws {@link Ichos.ForbiddenError}
124
130
  * @throws {@link Ichos.NotFoundError}
131
+ * @throws {@link Ichos.TooManyRequestsError}
125
132
  * @throws {@link Ichos.InternalServerError}
126
133
  *
127
134
  * @example
@@ -180,7 +187,7 @@ export class EpisodesClient {
180
187
  );
181
188
  case 403:
182
189
  throw new Ichos.ForbiddenError(
183
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
190
+ _response.error.body as Ichos.ForbiddenErrorResponse,
184
191
  _response.rawResponse,
185
192
  );
186
193
  case 404:
@@ -188,6 +195,11 @@ export class EpisodesClient {
188
195
  _response.error.body as Ichos.NotFoundErrorResponse,
189
196
  _response.rawResponse,
190
197
  );
198
+ case 429:
199
+ throw new Ichos.TooManyRequestsError(
200
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
201
+ _response.rawResponse,
202
+ );
191
203
  case 500:
192
204
  throw new Ichos.InternalServerError(
193
205
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -213,6 +225,7 @@ export class EpisodesClient {
213
225
  *
214
226
  * @throws {@link Ichos.UnauthorizedError}
215
227
  * @throws {@link Ichos.ForbiddenError}
228
+ * @throws {@link Ichos.TooManyRequestsError}
216
229
  * @throws {@link Ichos.InternalServerError}
217
230
  *
218
231
  * @example
@@ -295,7 +308,12 @@ export class EpisodesClient {
295
308
  );
296
309
  case 403:
297
310
  throw new Ichos.ForbiddenError(
298
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
311
+ _response.error.body as Ichos.ForbiddenErrorResponse,
312
+ _response.rawResponse,
313
+ );
314
+ case 429:
315
+ throw new Ichos.TooManyRequestsError(
316
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
299
317
  _response.rawResponse,
300
318
  );
301
319
  case 500:
@@ -324,6 +342,7 @@ export class EpisodesClient {
324
342
  * @throws {@link Ichos.UnauthorizedError}
325
343
  * @throws {@link Ichos.ForbiddenError}
326
344
  * @throws {@link Ichos.NotFoundError}
345
+ * @throws {@link Ichos.TooManyRequestsError}
327
346
  * @throws {@link Ichos.InternalServerError}
328
347
  *
329
348
  * @example
@@ -379,7 +398,7 @@ export class EpisodesClient {
379
398
  );
380
399
  case 403:
381
400
  throw new Ichos.ForbiddenError(
382
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
401
+ _response.error.body as Ichos.ForbiddenErrorResponse,
383
402
  _response.rawResponse,
384
403
  );
385
404
  case 404:
@@ -387,6 +406,11 @@ export class EpisodesClient {
387
406
  _response.error.body as Ichos.NotFoundErrorResponse,
388
407
  _response.rawResponse,
389
408
  );
409
+ case 429:
410
+ throw new Ichos.TooManyRequestsError(
411
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
412
+ _response.rawResponse,
413
+ );
390
414
  case 500:
391
415
  throw new Ichos.InternalServerError(
392
416
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -414,6 +438,7 @@ export class EpisodesClient {
414
438
  * @throws {@link Ichos.UnauthorizedError}
415
439
  * @throws {@link Ichos.ForbiddenError}
416
440
  * @throws {@link Ichos.NotFoundError}
441
+ * @throws {@link Ichos.TooManyRequestsError}
417
442
  * @throws {@link Ichos.InternalServerError}
418
443
  *
419
444
  * @example
@@ -474,7 +499,7 @@ export class EpisodesClient {
474
499
  );
475
500
  case 403:
476
501
  throw new Ichos.ForbiddenError(
477
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
502
+ _response.error.body as Ichos.ForbiddenErrorResponse,
478
503
  _response.rawResponse,
479
504
  );
480
505
  case 404:
@@ -482,6 +507,11 @@ export class EpisodesClient {
482
507
  _response.error.body as Ichos.NotFoundErrorResponse,
483
508
  _response.rawResponse,
484
509
  );
510
+ case 429:
511
+ throw new Ichos.TooManyRequestsError(
512
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
513
+ _response.rawResponse,
514
+ );
485
515
  case 500:
486
516
  throw new Ichos.InternalServerError(
487
517
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -500,7 +530,8 @@ export class EpisodesClient {
500
530
  }
501
531
 
502
532
  /**
503
- * Update an existing episode.
533
+ * Update an existing episode
534
+ * Cover uploads are finalized via storage events; to replace a cover, start a new upload flow.
504
535
  *
505
536
  * @param {Ichos.EpisodeUpdate} request
506
537
  * @param {EpisodesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -508,6 +539,7 @@ export class EpisodesClient {
508
539
  * @throws {@link Ichos.UnauthorizedError}
509
540
  * @throws {@link Ichos.ForbiddenError}
510
541
  * @throws {@link Ichos.NotFoundError}
542
+ * @throws {@link Ichos.TooManyRequestsError}
511
543
  * @throws {@link Ichos.InternalServerError}
512
544
  *
513
545
  * @example
@@ -566,7 +598,7 @@ export class EpisodesClient {
566
598
  );
567
599
  case 403:
568
600
  throw new Ichos.ForbiddenError(
569
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
601
+ _response.error.body as Ichos.ForbiddenErrorResponse,
570
602
  _response.rawResponse,
571
603
  );
572
604
  case 404:
@@ -574,6 +606,11 @@ export class EpisodesClient {
574
606
  _response.error.body as Ichos.NotFoundErrorResponse,
575
607
  _response.rawResponse,
576
608
  );
609
+ case 429:
610
+ throw new Ichos.TooManyRequestsError(
611
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
612
+ _response.rawResponse,
613
+ );
577
614
  case 500:
578
615
  throw new Ichos.InternalServerError(
579
616
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -600,6 +637,7 @@ export class EpisodesClient {
600
637
  * @throws {@link Ichos.UnauthorizedError}
601
638
  * @throws {@link Ichos.ForbiddenError}
602
639
  * @throws {@link Ichos.NotFoundError}
640
+ * @throws {@link Ichos.TooManyRequestsError}
603
641
  * @throws {@link Ichos.InternalServerError}
604
642
  *
605
643
  * @example
@@ -655,7 +693,7 @@ export class EpisodesClient {
655
693
  );
656
694
  case 403:
657
695
  throw new Ichos.ForbiddenError(
658
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
696
+ _response.error.body as Ichos.ForbiddenErrorResponse,
659
697
  _response.rawResponse,
660
698
  );
661
699
  case 404:
@@ -663,6 +701,11 @@ export class EpisodesClient {
663
701
  _response.error.body as Ichos.NotFoundErrorResponse,
664
702
  _response.rawResponse,
665
703
  );
704
+ case 429:
705
+ throw new Ichos.TooManyRequestsError(
706
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
707
+ _response.rawResponse,
708
+ );
666
709
  case 500:
667
710
  throw new Ichos.InternalServerError(
668
711
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -694,6 +737,7 @@ export class EpisodesClient {
694
737
  * @throws {@link Ichos.UnauthorizedError}
695
738
  * @throws {@link Ichos.ForbiddenError}
696
739
  * @throws {@link Ichos.NotFoundError}
740
+ * @throws {@link Ichos.TooManyRequestsError}
697
741
  * @throws {@link Ichos.InternalServerError}
698
742
  *
699
743
  * @example
@@ -753,7 +797,7 @@ export class EpisodesClient {
753
797
  );
754
798
  case 403:
755
799
  throw new Ichos.ForbiddenError(
756
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
800
+ _response.error.body as Ichos.ForbiddenErrorResponse,
757
801
  _response.rawResponse,
758
802
  );
759
803
  case 404:
@@ -761,98 +805,9 @@ export class EpisodesClient {
761
805
  _response.error.body as Ichos.NotFoundErrorResponse,
762
806
  _response.rawResponse,
763
807
  );
764
- case 500:
765
- throw new Ichos.InternalServerError(
766
- _response.error.body as Ichos.InternalServerErrorResponse,
767
- _response.rawResponse,
768
- );
769
- default:
770
- throw new errors.IchosError({
771
- statusCode: _response.error.statusCode,
772
- body: _response.error.body,
773
- rawResponse: _response.rawResponse,
774
- });
775
- }
776
- }
777
-
778
- return handleNonStatusCodeError(
779
- _response.error,
780
- _response.rawResponse,
781
- "POST",
782
- "/v1/episodes/{episodeId}/cover/pull",
783
- );
784
- }
785
-
786
- /**
787
- * Retrieve the current cover image for an episode.
788
- *
789
- * @param {Ichos.GetEpisodeCoverRequest} request
790
- * @param {EpisodesClient.RequestOptions} requestOptions - Request-specific configuration.
791
- *
792
- * @throws {@link Ichos.UnauthorizedError}
793
- * @throws {@link Ichos.ForbiddenError}
794
- * @throws {@link Ichos.NotFoundError}
795
- * @throws {@link Ichos.InternalServerError}
796
- *
797
- * @example
798
- * await client.episodes.getEpisodeCover({
799
- * episodeId: "episodeId"
800
- * })
801
- */
802
- public getEpisodeCover(
803
- request: Ichos.GetEpisodeCoverRequest,
804
- requestOptions?: EpisodesClient.RequestOptions,
805
- ): core.HttpResponsePromise<Ichos.RetrieveCoverResponse> {
806
- return core.HttpResponsePromise.fromPromise(this.__getEpisodeCover(request, requestOptions));
807
- }
808
-
809
- private async __getEpisodeCover(
810
- request: Ichos.GetEpisodeCoverRequest,
811
- requestOptions?: EpisodesClient.RequestOptions,
812
- ): Promise<core.WithRawResponse<Ichos.RetrieveCoverResponse>> {
813
- const { episodeId } = request;
814
- const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
815
- const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
816
- _authRequest.headers,
817
- this._options?.headers,
818
- mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
819
- requestOptions?.headers,
820
- );
821
- const _response = await core.fetcher({
822
- url: core.url.join(
823
- (await core.Supplier.get(this._options.baseUrl)) ??
824
- (await core.Supplier.get(this._options.environment)) ??
825
- environments.IchosEnvironment.Default,
826
- `v1/episodes/${core.url.encodePathParam(episodeId)}/cover`,
827
- ),
828
- method: "GET",
829
- headers: _headers,
830
- queryParameters: requestOptions?.queryParams,
831
- timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
832
- maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
833
- abortSignal: requestOptions?.abortSignal,
834
- fetchFn: this._options?.fetch,
835
- logging: this._options.logging,
836
- });
837
- if (_response.ok) {
838
- return { data: _response.body as Ichos.RetrieveCoverResponse, rawResponse: _response.rawResponse };
839
- }
840
-
841
- if (_response.error.reason === "status-code") {
842
- switch (_response.error.statusCode) {
843
- case 401:
844
- throw new Ichos.UnauthorizedError(
845
- _response.error.body as Ichos.UnauthorizedErrorResponse,
846
- _response.rawResponse,
847
- );
848
- case 403:
849
- throw new Ichos.ForbiddenError(
850
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
851
- _response.rawResponse,
852
- );
853
- case 404:
854
- throw new Ichos.NotFoundError(
855
- _response.error.body as Ichos.NotFoundErrorResponse,
808
+ case 429:
809
+ throw new Ichos.TooManyRequestsError(
810
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
856
811
  _response.rawResponse,
857
812
  );
858
813
  case 500:
@@ -872,8 +827,8 @@ export class EpisodesClient {
872
827
  return handleNonStatusCodeError(
873
828
  _response.error,
874
829
  _response.rawResponse,
875
- "GET",
876
- "/v1/episodes/{episodeId}/cover",
830
+ "POST",
831
+ "/v1/episodes/{episodeId}/cover/pull",
877
832
  );
878
833
  }
879
834
 
@@ -887,6 +842,7 @@ export class EpisodesClient {
887
842
  * @throws {@link Ichos.ForbiddenError}
888
843
  * @throws {@link Ichos.NotFoundError}
889
844
  * @throws {@link Ichos.UnprocessableEntityError}
845
+ * @throws {@link Ichos.TooManyRequestsError}
890
846
  * @throws {@link Ichos.InternalServerError}
891
847
  *
892
848
  * @example
@@ -942,7 +898,7 @@ export class EpisodesClient {
942
898
  );
943
899
  case 403:
944
900
  throw new Ichos.ForbiddenError(
945
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
901
+ _response.error.body as Ichos.ForbiddenErrorResponse,
946
902
  _response.rawResponse,
947
903
  );
948
904
  case 404:
@@ -955,6 +911,11 @@ export class EpisodesClient {
955
911
  _response.error.body as Ichos.ValidationErrorResponse,
956
912
  _response.rawResponse,
957
913
  );
914
+ case 429:
915
+ throw new Ichos.TooManyRequestsError(
916
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
917
+ _response.rawResponse,
918
+ );
958
919
  case 500:
959
920
  throw new Ichos.InternalServerError(
960
921
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -986,6 +947,7 @@ export class EpisodesClient {
986
947
  * @throws {@link Ichos.UnauthorizedError}
987
948
  * @throws {@link Ichos.ForbiddenError}
988
949
  * @throws {@link Ichos.NotFoundError}
950
+ * @throws {@link Ichos.TooManyRequestsError}
989
951
  * @throws {@link Ichos.InternalServerError}
990
952
  *
991
953
  * @example
@@ -1041,7 +1003,7 @@ export class EpisodesClient {
1041
1003
  );
1042
1004
  case 403:
1043
1005
  throw new Ichos.ForbiddenError(
1044
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
1006
+ _response.error.body as Ichos.ForbiddenErrorResponse,
1045
1007
  _response.rawResponse,
1046
1008
  );
1047
1009
  case 404:
@@ -1049,6 +1011,11 @@ export class EpisodesClient {
1049
1011
  _response.error.body as Ichos.NotFoundErrorResponse,
1050
1012
  _response.rawResponse,
1051
1013
  );
1014
+ case 429:
1015
+ throw new Ichos.TooManyRequestsError(
1016
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
1017
+ _response.rawResponse,
1018
+ );
1052
1019
  case 500:
1053
1020
  throw new Ichos.InternalServerError(
1054
1021
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -1080,6 +1047,7 @@ export class EpisodesClient {
1080
1047
  * @throws {@link Ichos.UnauthorizedError}
1081
1048
  * @throws {@link Ichos.ForbiddenError}
1082
1049
  * @throws {@link Ichos.NotFoundError}
1050
+ * @throws {@link Ichos.TooManyRequestsError}
1083
1051
  * @throws {@link Ichos.InternalServerError}
1084
1052
  *
1085
1053
  * @example
@@ -1135,7 +1103,7 @@ export class EpisodesClient {
1135
1103
  );
1136
1104
  case 403:
1137
1105
  throw new Ichos.ForbiddenError(
1138
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
1106
+ _response.error.body as Ichos.ForbiddenErrorResponse,
1139
1107
  _response.rawResponse,
1140
1108
  );
1141
1109
  case 404:
@@ -1143,6 +1111,11 @@ export class EpisodesClient {
1143
1111
  _response.error.body as Ichos.NotFoundErrorResponse,
1144
1112
  _response.rawResponse,
1145
1113
  );
1114
+ case 429:
1115
+ throw new Ichos.TooManyRequestsError(
1116
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
1117
+ _response.rawResponse,
1118
+ );
1146
1119
  case 500:
1147
1120
  throw new Ichos.InternalServerError(
1148
1121
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -1174,6 +1147,7 @@ export class EpisodesClient {
1174
1147
  * @throws {@link Ichos.UnauthorizedError}
1175
1148
  * @throws {@link Ichos.ForbiddenError}
1176
1149
  * @throws {@link Ichos.NotFoundError}
1150
+ * @throws {@link Ichos.TooManyRequestsError}
1177
1151
  * @throws {@link Ichos.InternalServerError}
1178
1152
  *
1179
1153
  * @example
@@ -1233,7 +1207,7 @@ export class EpisodesClient {
1233
1207
  );
1234
1208
  case 403:
1235
1209
  throw new Ichos.ForbiddenError(
1236
- _response.error.body as Ichos.UnauthenticatedErrorResponse,
1210
+ _response.error.body as Ichos.ForbiddenErrorResponse,
1237
1211
  _response.rawResponse,
1238
1212
  );
1239
1213
  case 404:
@@ -1241,6 +1215,11 @@ export class EpisodesClient {
1241
1215
  _response.error.body as Ichos.NotFoundErrorResponse,
1242
1216
  _response.rawResponse,
1243
1217
  );
1218
+ case 429:
1219
+ throw new Ichos.TooManyRequestsError(
1220
+ _response.error.body as Ichos.TooManyRequestsErrorResponse,
1221
+ _response.rawResponse,
1222
+ );
1244
1223
  case 500:
1245
1224
  throw new Ichos.InternalServerError(
1246
1225
  _response.error.body as Ichos.InternalServerErrorResponse,
@@ -17,16 +17,13 @@ export interface EpisodeCreate {
17
17
  description?: string | null;
18
18
  explicit?: boolean | null;
19
19
  block?: boolean | null;
20
- pubDate?: string | null;
21
20
  season?: number | null;
22
21
  episode?: number | null;
23
22
  episodeType?: EpisodeCreate.EpisodeType | null;
24
- coverKey?: string | null;
25
23
  transcripts?: Ichos.EpisodeTranscript[] | null;
26
24
  chaptersUrl?: string | null;
27
25
  persons?: Ichos.Person[] | null;
28
26
  license?: string | null;
29
- status?: EpisodeCreate.Status;
30
27
  metadata?: Ichos.Metadata | null;
31
28
  autoPublish?: boolean;
32
29
  coverOptions?: Ichos.CoverUploadOptions;
@@ -40,11 +37,4 @@ export namespace EpisodeCreate {
40
37
  Bonus: "bonus",
41
38
  } as const;
42
39
  export type EpisodeType = (typeof EpisodeType)[keyof typeof EpisodeType];
43
- export const Status = {
44
- Draft: "draft",
45
- Scheduled: "scheduled",
46
- Published: "published",
47
- Deleted: "deleted",
48
- } as const;
49
- export type Status = (typeof Status)[keyof typeof Status];
50
40
  }
@@ -18,18 +18,15 @@ export interface EpisodeUpdate {
18
18
  explicit?: boolean;
19
19
  block?: boolean;
20
20
  metadata?: Ichos.Metadata;
21
- pubDate?: string;
21
+ coverOptions?: Ichos.CoverUploadOptions;
22
22
  season?: number;
23
23
  episode?: number;
24
24
  episodeType?: EpisodeUpdate.EpisodeType;
25
- coverKey?: string;
26
25
  transcripts?: Ichos.EpisodeTranscript[];
27
26
  chaptersUrl?: string;
28
27
  persons?: Ichos.Person[];
29
28
  license?: string;
30
- status?: EpisodeUpdate.Status;
31
29
  autoPublish?: boolean;
32
- coverOptions?: Ichos.CoverUploadOptions;
33
30
  audioOptions?: Ichos.AudioUploadOptions;
34
31
  }
35
32
 
@@ -40,11 +37,4 @@ export namespace EpisodeUpdate {
40
37
  Bonus: "bonus",
41
38
  } as const;
42
39
  export type EpisodeType = (typeof EpisodeType)[keyof typeof EpisodeType];
43
- export const Status = {
44
- Draft: "draft",
45
- Scheduled: "scheduled",
46
- Published: "published",
47
- Deleted: "deleted",
48
- } as const;
49
- export type Status = (typeof Status)[keyof typeof Status];
50
40
  }
@@ -3,7 +3,6 @@ export type { EpisodeCreate } from "./EpisodeCreate.js";
3
3
  export type { EpisodeUpdate } from "./EpisodeUpdate.js";
4
4
  export type { GenerateEpisodeCoverUploadUrlRequest } from "./GenerateEpisodeCoverUploadUrlRequest.js";
5
5
  export type { GetEpisodeAudioRequest } from "./GetEpisodeAudioRequest.js";
6
- export type { GetEpisodeCoverRequest } from "./GetEpisodeCoverRequest.js";
7
6
  export type { GetEpisodeListenersReportRequest } from "./GetEpisodeListenersReportRequest.js";
8
7
  export type { GetEpisodeRequest } from "./GetEpisodeRequest.js";
9
8
  export type { LinkEpisodeAudioRequest } from "./LinkEpisodeAudioRequest.js";
@@ -1,7 +1,5 @@
1
1
  export * from "./ads/client/requests/index.js";
2
2
  export * as ads from "./ads/index.js";
3
- export * from "./analytics/client/requests/index.js";
4
- export * as analytics from "./analytics/index.js";
5
3
  export * from "./audio/client/requests/index.js";
6
4
  export * as audio from "./audio/index.js";
7
5
  export * from "./episodes/client/requests/index.js";