@ichos/sdk 1.0.9 → 1.0.11
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.
- package/dist/Client.d.ts +0 -3
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +0 -5
- package/dist/Client.js.map +1 -1
- package/dist/api/errors/BadRequestError.d.ts +7 -0
- package/dist/api/errors/BadRequestError.d.ts.map +1 -0
- package/dist/api/errors/BadRequestError.js +18 -0
- package/dist/api/errors/BadRequestError.js.map +1 -0
- package/dist/api/errors/ForbiddenError.d.ts +1 -1
- package/dist/api/errors/ForbiddenError.d.ts.map +1 -1
- package/dist/api/errors/ForbiddenError.js.map +1 -1
- package/dist/api/errors/TooManyRequestsError.d.ts +7 -0
- package/dist/api/errors/TooManyRequestsError.d.ts.map +1 -0
- package/dist/api/errors/TooManyRequestsError.js +18 -0
- package/dist/api/errors/TooManyRequestsError.js.map +1 -0
- package/dist/api/errors/index.d.ts +2 -0
- package/dist/api/errors/index.d.ts.map +1 -1
- package/dist/api/errors/index.js +2 -0
- package/dist/api/errors/index.js.map +1 -1
- package/dist/api/resources/ads/client/Client.d.ts +12 -0
- package/dist/api/resources/ads/client/Client.d.ts.map +1 -1
- package/dist/api/resources/ads/client/Client.js +36 -0
- package/dist/api/resources/ads/client/Client.js.map +1 -1
- package/dist/api/resources/audio/client/Client.d.ts +10 -39
- package/dist/api/resources/audio/client/Client.d.ts.map +1 -1
- package/dist/api/resources/audio/client/Client.js +31 -121
- package/dist/api/resources/audio/client/Client.js.map +1 -1
- package/dist/api/resources/audio/client/requests/GenerateAudioUploadUrlRequest.d.ts +10 -0
- package/dist/api/resources/audio/client/requests/GenerateAudioUploadUrlRequest.d.ts.map +1 -0
- package/dist/api/resources/audio/client/requests/{GetAudioPullStatusRequest.js → GenerateAudioUploadUrlRequest.js} +1 -1
- package/dist/api/resources/audio/client/requests/GenerateAudioUploadUrlRequest.js.map +1 -0
- package/dist/api/resources/audio/client/requests/PullAudioDto.d.ts +2 -0
- package/dist/api/resources/audio/client/requests/PullAudioDto.d.ts.map +1 -1
- package/dist/api/resources/audio/client/requests/index.d.ts +1 -2
- package/dist/api/resources/audio/client/requests/index.d.ts.map +1 -1
- package/dist/api/resources/audio/index.d.ts +1 -0
- package/dist/api/resources/audio/index.d.ts.map +1 -1
- package/dist/api/resources/audio/index.js +1 -0
- package/dist/api/resources/audio/index.js.map +1 -1
- package/dist/api/resources/audio/types/GenerateAudioUploadUrlRequestLinkTo.d.ts +7 -0
- package/dist/api/resources/audio/types/GenerateAudioUploadUrlRequestLinkTo.d.ts.map +1 -0
- package/dist/api/resources/audio/types/GenerateAudioUploadUrlRequestLinkTo.js +7 -0
- package/dist/api/resources/audio/types/GenerateAudioUploadUrlRequestLinkTo.js.map +1 -0
- package/dist/api/resources/audio/types/index.d.ts +2 -0
- package/dist/api/resources/audio/types/index.d.ts.map +1 -0
- package/dist/api/resources/audio/types/index.js +2 -0
- package/dist/api/resources/audio/types/index.js.map +1 -0
- package/dist/api/resources/episodes/client/Client.d.ts +17 -20
- package/dist/api/resources/episodes/client/Client.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/Client.js +41 -61
- package/dist/api/resources/episodes/client/Client.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts +0 -10
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.js +0 -6
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts +2 -11
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js +0 -6
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/index.d.ts +0 -1
- package/dist/api/resources/episodes/client/requests/index.d.ts.map +1 -1
- package/dist/api/resources/index.d.ts +2 -2
- package/dist/api/resources/index.d.ts.map +1 -1
- package/dist/api/resources/index.js +2 -2
- package/dist/api/resources/index.js.map +1 -1
- package/dist/api/resources/organizations/client/Client.d.ts +2 -12
- package/dist/api/resources/organizations/client/Client.d.ts.map +1 -1
- package/dist/api/resources/organizations/client/Client.js +6 -53
- package/dist/api/resources/organizations/client/Client.js.map +1 -1
- package/dist/api/resources/podcasts/client/Client.d.ts +39 -22
- package/dist/api/resources/podcasts/client/Client.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/Client.js +104 -61
- package/dist/api/resources/podcasts/client/Client.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/GetAverageMonthlyListenersRequest.d.ts.map +1 -0
- package/dist/api/resources/podcasts/client/requests/GetAverageMonthlyListenersRequest.js.map +1 -0
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts +7 -4
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts +5 -1
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/index.d.ts +1 -1
- package/dist/api/resources/podcasts/client/requests/index.d.ts.map +1 -1
- package/dist/api/resources/segments/client/Client.d.ts +7 -21
- package/dist/api/resources/segments/client/Client.d.ts.map +1 -1
- package/dist/api/resources/segments/client/Client.js +18 -65
- package/dist/api/resources/segments/client/Client.js.map +1 -1
- package/dist/api/resources/segments/client/requests/ListSegmentsRequest.d.ts +12 -0
- package/dist/api/resources/segments/client/requests/ListSegmentsRequest.d.ts.map +1 -0
- package/dist/api/{types/EpisodeSearchParams.js → resources/segments/client/requests/ListSegmentsRequest.js} +1 -1
- package/dist/api/resources/segments/client/requests/ListSegmentsRequest.js.map +1 -0
- package/dist/api/resources/segments/client/requests/SegmentCreate.d.ts +25 -4
- package/dist/api/resources/segments/client/requests/SegmentCreate.d.ts.map +1 -1
- package/dist/api/resources/segments/client/requests/SegmentCreate.js +8 -1
- package/dist/api/resources/segments/client/requests/SegmentCreate.js.map +1 -1
- package/dist/api/resources/segments/client/requests/SegmentUpdate.d.ts +25 -4
- package/dist/api/resources/segments/client/requests/SegmentUpdate.d.ts.map +1 -1
- package/dist/api/resources/segments/client/requests/SegmentUpdate.js +8 -1
- package/dist/api/resources/segments/client/requests/SegmentUpdate.js.map +1 -1
- package/dist/api/resources/segments/client/requests/index.d.ts +1 -1
- package/dist/api/resources/segments/client/requests/index.d.ts.map +1 -1
- package/dist/api/resources/segments/index.d.ts +1 -0
- package/dist/api/resources/segments/index.d.ts.map +1 -1
- package/dist/api/resources/segments/index.js +1 -0
- package/dist/api/resources/segments/index.js.map +1 -1
- package/dist/api/resources/segments/types/ListSegmentsRequestScope.d.ts +7 -0
- package/dist/api/resources/segments/types/ListSegmentsRequestScope.d.ts.map +1 -0
- package/dist/api/resources/segments/types/ListSegmentsRequestScope.js +7 -0
- package/dist/api/resources/segments/types/ListSegmentsRequestScope.js.map +1 -0
- package/dist/api/resources/segments/types/index.d.ts +2 -0
- package/dist/api/resources/segments/types/index.d.ts.map +1 -0
- package/dist/api/resources/segments/types/index.js +2 -0
- package/dist/api/resources/segments/types/index.js.map +1 -0
- package/dist/api/resources/users/client/Client.d.ts +8 -0
- package/dist/api/resources/users/client/Client.d.ts.map +1 -1
- package/dist/api/resources/users/client/Client.js +18 -0
- package/dist/api/resources/users/client/Client.js.map +1 -1
- package/dist/api/resources/webhooks/client/Client.d.ts +4 -0
- package/dist/api/resources/webhooks/client/Client.d.ts.map +1 -1
- package/dist/api/resources/webhooks/client/Client.js +12 -0
- package/dist/api/resources/webhooks/client/Client.js.map +1 -1
- package/dist/api/types/Audio.d.ts +11 -2
- package/dist/api/types/Audio.d.ts.map +1 -1
- package/dist/api/types/Audio.js +1 -0
- package/dist/api/types/Audio.js.map +1 -1
- package/dist/api/types/{UnauthenticatedError.d.ts → BadRequestErrorBody.d.ts} +2 -2
- package/dist/api/types/BadRequestErrorBody.d.ts.map +1 -0
- package/dist/api/types/{UnauthenticatedError.js → BadRequestErrorBody.js} +1 -1
- package/dist/api/types/BadRequestErrorBody.js.map +1 -0
- package/dist/api/types/Chapter.d.ts +3 -0
- package/dist/api/types/Chapter.d.ts.map +1 -1
- package/dist/api/types/EpisodeCreateResponse.d.ts +1 -1
- package/dist/api/types/EpisodeCreateResponse.d.ts.map +1 -1
- package/dist/api/types/{EpisodeCreatedResponseData.d.ts → EpisodeCreateResponseData.d.ts} +6 -6
- package/dist/api/types/EpisodeCreateResponseData.d.ts.map +1 -0
- package/dist/api/types/{EpisodeCreatedResponseData.js → EpisodeCreateResponseData.js} +7 -7
- package/dist/api/types/EpisodeCreateResponseData.js.map +1 -0
- package/dist/api/types/ForbiddenErrorBody.d.ts +6 -0
- package/dist/api/types/ForbiddenErrorBody.d.ts.map +1 -0
- package/dist/api/types/{StringOrNullResponse.js → ForbiddenErrorBody.js} +1 -1
- package/dist/api/types/ForbiddenErrorBody.js.map +1 -0
- package/dist/api/types/ForbiddenErrorResponse.d.ts +7 -0
- package/dist/api/types/ForbiddenErrorResponse.d.ts.map +1 -0
- package/dist/api/{resources/podcasts/client/requests/GetPodcastCoverRequest.js → types/ForbiddenErrorResponse.js} +1 -1
- package/dist/api/types/ForbiddenErrorResponse.js.map +1 -0
- package/dist/api/types/InternalServerErrorBody.d.ts +0 -3
- package/dist/api/types/InternalServerErrorBody.d.ts.map +1 -1
- package/dist/api/types/LinkTo.d.ts +13 -0
- package/dist/api/types/LinkTo.d.ts.map +1 -0
- package/dist/api/types/LinkTo.js +10 -0
- package/dist/api/types/LinkTo.js.map +1 -0
- package/dist/api/types/NotFoundErrorBody.d.ts +0 -3
- package/dist/api/types/NotFoundErrorBody.d.ts.map +1 -1
- package/dist/api/types/Podcast.d.ts +2 -1
- package/dist/api/types/Podcast.d.ts.map +1 -1
- package/dist/api/types/Podcast.js.map +1 -1
- package/dist/api/types/PodcastCreateResponse.d.ts +7 -0
- package/dist/api/types/PodcastCreateResponse.d.ts.map +1 -0
- package/dist/api/types/{RetrieveCoverResponse.js → PodcastCreateResponse.js} +1 -1
- package/dist/api/types/PodcastCreateResponse.js.map +1 -0
- package/dist/api/types/PodcastCreateResponseData.d.ts +80 -0
- package/dist/api/types/PodcastCreateResponseData.d.ts.map +1 -0
- package/dist/api/types/PodcastCreateResponseData.js +22 -0
- package/dist/api/types/PodcastCreateResponseData.js.map +1 -0
- package/dist/api/types/PublishPodcastResponse.d.ts +7 -0
- package/dist/api/types/PublishPodcastResponse.d.ts.map +1 -0
- package/dist/api/{resources/episodes/client/requests/GetEpisodeCoverRequest.js → types/PublishPodcastResponse.js} +1 -1
- package/dist/api/types/PublishPodcastResponse.js.map +1 -0
- package/dist/api/types/{EpisodeSearchParams.d.ts → SearchParams.d.ts} +4 -4
- package/dist/api/types/SearchParams.d.ts.map +1 -0
- package/dist/api/types/{AudioEntityLink.js → SearchParams.js} +1 -1
- package/dist/api/types/SearchParams.js.map +1 -0
- package/dist/api/types/Segment.d.ts +1 -2
- package/dist/api/types/Segment.d.ts.map +1 -1
- package/dist/api/types/Segment.js +1 -1
- package/dist/api/types/Segment.js.map +1 -1
- package/dist/api/types/TooManyRequestsErrorBody.d.ts +7 -0
- package/dist/api/types/TooManyRequestsErrorBody.d.ts.map +1 -0
- package/dist/api/types/TooManyRequestsErrorBody.js +3 -0
- package/dist/api/types/TooManyRequestsErrorBody.js.map +1 -0
- package/dist/api/types/TooManyRequestsErrorResponse.d.ts +7 -0
- package/dist/api/types/TooManyRequestsErrorResponse.d.ts.map +1 -0
- package/dist/api/{resources/audio/client/requests/FinalizeAudioUploadRequest.js → types/TooManyRequestsErrorResponse.js} +1 -1
- package/dist/api/types/TooManyRequestsErrorResponse.js.map +1 -0
- package/dist/api/types/UnauthorizedErrorBody.d.ts +0 -3
- package/dist/api/types/UnauthorizedErrorBody.d.ts.map +1 -1
- package/dist/api/types/ValidationError.d.ts +8 -0
- package/dist/api/types/ValidationError.d.ts.map +1 -0
- package/dist/api/types/ValidationError.js +3 -0
- package/dist/api/types/ValidationError.js.map +1 -0
- package/dist/api/types/ValidationErrorResponse.d.ts +1 -1
- package/dist/api/types/ValidationErrorResponse.d.ts.map +1 -1
- package/dist/api/types/ValidationIssue.d.ts +1 -0
- package/dist/api/types/ValidationIssue.d.ts.map +1 -1
- package/dist/api/types/ValidationIssue.js +1 -0
- package/dist/api/types/ValidationIssue.js.map +1 -1
- package/dist/api/types/index.d.ts +12 -8
- package/dist/api/types/index.d.ts.map +1 -1
- package/dist/api/types/index.js +12 -8
- package/dist/api/types/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Client.ts +0 -6
- package/src/api/errors/BadRequestError.ts +22 -0
- package/src/api/errors/ForbiddenError.ts +1 -1
- package/src/api/errors/TooManyRequestsError.ts +22 -0
- package/src/api/errors/index.ts +2 -0
- package/src/api/resources/ads/client/Client.ts +84 -12
- package/src/api/resources/audio/client/Client.ts +46 -168
- package/src/api/resources/audio/client/requests/GenerateAudioUploadUrlRequest.ts +12 -0
- package/src/api/resources/audio/client/requests/PullAudioDto.ts +3 -0
- package/src/api/resources/audio/client/requests/index.ts +1 -2
- package/src/api/resources/audio/index.ts +1 -0
- package/src/api/resources/audio/types/GenerateAudioUploadUrlRequestLinkTo.ts +9 -0
- package/src/api/resources/audio/types/index.ts +1 -0
- package/src/api/resources/episodes/client/Client.ts +89 -108
- package/src/api/resources/episodes/client/requests/EpisodeCreate.ts +0 -10
- package/src/api/resources/episodes/client/requests/EpisodeUpdate.ts +2 -11
- package/src/api/resources/episodes/client/requests/index.ts +0 -1
- package/src/api/resources/index.ts +2 -2
- package/src/api/resources/organizations/client/Client.ts +13 -84
- package/src/api/resources/podcasts/client/Client.ts +197 -115
- package/src/api/resources/podcasts/client/requests/PodcastCreate.ts +7 -4
- package/src/api/resources/podcasts/client/requests/PodcastUpdate.ts +5 -1
- package/src/api/resources/podcasts/client/requests/index.ts +1 -1
- package/src/api/resources/segments/client/Client.ts +27 -103
- package/src/api/resources/segments/client/requests/ListSegmentsRequest.ts +14 -0
- package/src/api/resources/segments/client/requests/SegmentCreate.ts +26 -4
- package/src/api/resources/segments/client/requests/SegmentUpdate.ts +26 -4
- package/src/api/resources/segments/client/requests/index.ts +1 -1
- package/src/api/resources/segments/index.ts +1 -0
- package/src/api/resources/segments/types/ListSegmentsRequestScope.ts +8 -0
- package/src/api/resources/segments/types/index.ts +1 -0
- package/src/api/resources/users/client/Client.ts +38 -5
- package/src/api/resources/webhooks/client/Client.ts +28 -4
- package/src/api/types/Audio.ts +11 -2
- package/src/api/types/{UnauthenticatedError.ts → BadRequestErrorBody.ts} +1 -1
- package/src/api/types/Chapter.ts +3 -0
- package/src/api/types/EpisodeCreateResponse.ts +1 -1
- package/src/api/types/{EpisodeCreatedResponseData.ts → EpisodeCreateResponseData.ts} +5 -5
- package/src/api/types/ForbiddenErrorBody.ts +7 -0
- package/src/api/types/{UnauthenticatedErrorResponse.ts → ForbiddenErrorResponse.ts} +2 -2
- package/src/api/types/InternalServerErrorBody.ts +0 -3
- package/src/api/types/LinkTo.ts +15 -0
- package/src/api/types/NotFoundErrorBody.ts +0 -3
- package/src/api/types/Podcast.ts +2 -1
- package/src/api/types/PodcastCreateResponse.ts +9 -0
- package/src/api/types/PodcastCreateResponseData.ts +83 -0
- package/src/api/types/{StringOrNullResponse.ts → PublishPodcastResponse.ts} +2 -2
- package/src/api/types/{EpisodeSearchParams.ts → SearchParams.ts} +3 -3
- package/src/api/types/Segment.ts +1 -2
- package/src/api/types/TooManyRequestsErrorBody.ts +8 -0
- package/src/api/types/TooManyRequestsErrorResponse.ts +9 -0
- package/src/api/types/UnauthorizedErrorBody.ts +0 -3
- package/src/api/types/ValidationError.ts +10 -0
- package/src/api/types/ValidationErrorResponse.ts +1 -1
- package/src/api/types/ValidationIssue.ts +1 -0
- package/src/api/types/index.ts +12 -8
- package/dist/api/resources/analytics/client/Client.d.ts +0 -29
- package/dist/api/resources/analytics/client/Client.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/Client.js +0 -69
- package/dist/api/resources/analytics/client/Client.js.map +0 -1
- package/dist/api/resources/analytics/client/index.d.ts +0 -2
- package/dist/api/resources/analytics/client/index.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/index.js +0 -2
- package/dist/api/resources/analytics/client/index.js.map +0 -1
- package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.js.map +0 -1
- package/dist/api/resources/analytics/client/requests/index.d.ts +0 -2
- package/dist/api/resources/analytics/client/requests/index.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/requests/index.js +0 -2
- package/dist/api/resources/analytics/client/requests/index.js.map +0 -1
- package/dist/api/resources/analytics/index.d.ts +0 -2
- package/dist/api/resources/analytics/index.d.ts.map +0 -1
- package/dist/api/resources/analytics/index.js +0 -2
- package/dist/api/resources/analytics/index.js.map +0 -1
- package/dist/api/resources/audio/client/requests/FinalizeAudioUploadRequest.d.ts +0 -17
- package/dist/api/resources/audio/client/requests/FinalizeAudioUploadRequest.d.ts.map +0 -1
- package/dist/api/resources/audio/client/requests/FinalizeAudioUploadRequest.js.map +0 -1
- package/dist/api/resources/audio/client/requests/GetAudioPullStatusRequest.d.ts +0 -11
- package/dist/api/resources/audio/client/requests/GetAudioPullStatusRequest.d.ts.map +0 -1
- package/dist/api/resources/audio/client/requests/GetAudioPullStatusRequest.js.map +0 -1
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.d.ts +0 -11
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.d.ts.map +0 -1
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.js.map +0 -1
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.d.ts +0 -11
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.d.ts.map +0 -1
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.js.map +0 -1
- package/dist/api/resources/segments/client/requests/ListPodcastSegmentsRequest.d.ts +0 -11
- package/dist/api/resources/segments/client/requests/ListPodcastSegmentsRequest.d.ts.map +0 -1
- package/dist/api/resources/segments/client/requests/ListPodcastSegmentsRequest.js +0 -3
- package/dist/api/resources/segments/client/requests/ListPodcastSegmentsRequest.js.map +0 -1
- package/dist/api/types/AudioEntityLink.d.ts +0 -17
- package/dist/api/types/AudioEntityLink.d.ts.map +0 -1
- package/dist/api/types/AudioEntityLink.js.map +0 -1
- package/dist/api/types/AudioPullStatusResponse.d.ts +0 -23
- package/dist/api/types/AudioPullStatusResponse.d.ts.map +0 -1
- package/dist/api/types/AudioPullStatusResponse.js +0 -16
- package/dist/api/types/AudioPullStatusResponse.js.map +0 -1
- package/dist/api/types/EpisodeCreatedResponseData.d.ts.map +0 -1
- package/dist/api/types/EpisodeCreatedResponseData.js.map +0 -1
- package/dist/api/types/EpisodeSearchParams.d.ts.map +0 -1
- package/dist/api/types/EpisodeSearchParams.js.map +0 -1
- package/dist/api/types/RetrieveCoverResponse.d.ts +0 -12
- package/dist/api/types/RetrieveCoverResponse.d.ts.map +0 -1
- package/dist/api/types/RetrieveCoverResponse.js.map +0 -1
- package/dist/api/types/StringOrNullResponse.d.ts +0 -7
- package/dist/api/types/StringOrNullResponse.d.ts.map +0 -1
- package/dist/api/types/StringOrNullResponse.js.map +0 -1
- package/dist/api/types/UnauthenticatedError.d.ts.map +0 -1
- package/dist/api/types/UnauthenticatedError.js.map +0 -1
- package/dist/api/types/UnauthenticatedErrorResponse.d.ts +0 -7
- package/dist/api/types/UnauthenticatedErrorResponse.d.ts.map +0 -1
- package/dist/api/types/UnauthenticatedErrorResponse.js +0 -3
- package/dist/api/types/UnauthenticatedErrorResponse.js.map +0 -1
- package/src/api/resources/analytics/client/Client.ts +0 -110
- package/src/api/resources/analytics/client/index.ts +0 -1
- package/src/api/resources/analytics/client/requests/index.ts +0 -1
- package/src/api/resources/analytics/index.ts +0 -1
- package/src/api/resources/audio/client/requests/FinalizeAudioUploadRequest.ts +0 -19
- package/src/api/resources/audio/client/requests/GetAudioPullStatusRequest.ts +0 -12
- package/src/api/resources/episodes/client/requests/GetEpisodeCoverRequest.ts +0 -12
- package/src/api/resources/podcasts/client/requests/GetPodcastCoverRequest.ts +0 -12
- package/src/api/resources/segments/client/requests/ListPodcastSegmentsRequest.ts +0 -12
- package/src/api/types/AudioEntityLink.ts +0 -22
- package/src/api/types/AudioPullStatusResponse.ts +0 -27
- package/src/api/types/RetrieveCoverResponse.ts +0 -15
- /package/dist/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.d.ts +0 -0
- /package/dist/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.js +0 -0
- /package/src/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.ts +0 -0
|
@@ -15,6 +15,9 @@ export declare namespace PodcastsClient {
|
|
|
15
15
|
export interface RequestOptions extends BaseRequestOptions {}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Endpoints related to podcast management.
|
|
20
|
+
*/
|
|
18
21
|
export class PodcastsClient {
|
|
19
22
|
protected readonly _options: NormalizedClientOptionsWithAuth<PodcastsClient.Options>;
|
|
20
23
|
|
|
@@ -29,6 +32,7 @@ export class PodcastsClient {
|
|
|
29
32
|
*
|
|
30
33
|
* @throws {@link Ichos.UnauthorizedError}
|
|
31
34
|
* @throws {@link Ichos.ForbiddenError}
|
|
35
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
32
36
|
* @throws {@link Ichos.InternalServerError}
|
|
33
37
|
*
|
|
34
38
|
* @example
|
|
@@ -79,7 +83,12 @@ export class PodcastsClient {
|
|
|
79
83
|
);
|
|
80
84
|
case 403:
|
|
81
85
|
throw new Ichos.ForbiddenError(
|
|
82
|
-
_response.error.body as Ichos.
|
|
86
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
87
|
+
_response.rawResponse,
|
|
88
|
+
);
|
|
89
|
+
case 429:
|
|
90
|
+
throw new Ichos.TooManyRequestsError(
|
|
91
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
83
92
|
_response.rawResponse,
|
|
84
93
|
);
|
|
85
94
|
case 500:
|
|
@@ -108,25 +117,25 @@ export class PodcastsClient {
|
|
|
108
117
|
* @throws {@link Ichos.UnauthorizedError}
|
|
109
118
|
* @throws {@link Ichos.ForbiddenError}
|
|
110
119
|
* @throws {@link Ichos.NotFoundError}
|
|
120
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
111
121
|
* @throws {@link Ichos.InternalServerError}
|
|
112
122
|
*
|
|
113
123
|
* @example
|
|
114
124
|
* await client.podcasts.createPodcast({
|
|
115
|
-
* title: "The Tech Wave"
|
|
116
|
-
* explicit: false
|
|
125
|
+
* title: "The Tech Wave"
|
|
117
126
|
* })
|
|
118
127
|
*/
|
|
119
128
|
public createPodcast(
|
|
120
129
|
request: Ichos.PodcastCreate,
|
|
121
130
|
requestOptions?: PodcastsClient.RequestOptions,
|
|
122
|
-
): core.HttpResponsePromise<Ichos.
|
|
131
|
+
): core.HttpResponsePromise<Ichos.PodcastCreateResponse> {
|
|
123
132
|
return core.HttpResponsePromise.fromPromise(this.__createPodcast(request, requestOptions));
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
private async __createPodcast(
|
|
127
136
|
request: Ichos.PodcastCreate,
|
|
128
137
|
requestOptions?: PodcastsClient.RequestOptions,
|
|
129
|
-
): Promise<core.WithRawResponse<Ichos.
|
|
138
|
+
): Promise<core.WithRawResponse<Ichos.PodcastCreateResponse>> {
|
|
130
139
|
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
131
140
|
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
132
141
|
_authRequest.headers,
|
|
@@ -154,7 +163,7 @@ export class PodcastsClient {
|
|
|
154
163
|
logging: this._options.logging,
|
|
155
164
|
});
|
|
156
165
|
if (_response.ok) {
|
|
157
|
-
return { data: _response.body as Ichos.
|
|
166
|
+
return { data: _response.body as Ichos.PodcastCreateResponse, rawResponse: _response.rawResponse };
|
|
158
167
|
}
|
|
159
168
|
|
|
160
169
|
if (_response.error.reason === "status-code") {
|
|
@@ -166,7 +175,7 @@ export class PodcastsClient {
|
|
|
166
175
|
);
|
|
167
176
|
case 403:
|
|
168
177
|
throw new Ichos.ForbiddenError(
|
|
169
|
-
_response.error.body as Ichos.
|
|
178
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
170
179
|
_response.rawResponse,
|
|
171
180
|
);
|
|
172
181
|
case 404:
|
|
@@ -174,6 +183,11 @@ export class PodcastsClient {
|
|
|
174
183
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
175
184
|
_response.rawResponse,
|
|
176
185
|
);
|
|
186
|
+
case 429:
|
|
187
|
+
throw new Ichos.TooManyRequestsError(
|
|
188
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
189
|
+
_response.rawResponse,
|
|
190
|
+
);
|
|
177
191
|
case 500:
|
|
178
192
|
throw new Ichos.InternalServerError(
|
|
179
193
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -199,6 +213,7 @@ export class PodcastsClient {
|
|
|
199
213
|
*
|
|
200
214
|
* @throws {@link Ichos.UnauthorizedError}
|
|
201
215
|
* @throws {@link Ichos.ForbiddenError}
|
|
216
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
202
217
|
* @throws {@link Ichos.InternalServerError}
|
|
203
218
|
*
|
|
204
219
|
* @example
|
|
@@ -281,7 +296,12 @@ export class PodcastsClient {
|
|
|
281
296
|
);
|
|
282
297
|
case 403:
|
|
283
298
|
throw new Ichos.ForbiddenError(
|
|
284
|
-
_response.error.body as Ichos.
|
|
299
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
300
|
+
_response.rawResponse,
|
|
301
|
+
);
|
|
302
|
+
case 429:
|
|
303
|
+
throw new Ichos.TooManyRequestsError(
|
|
304
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
285
305
|
_response.rawResponse,
|
|
286
306
|
);
|
|
287
307
|
case 500:
|
|
@@ -310,6 +330,7 @@ export class PodcastsClient {
|
|
|
310
330
|
* @throws {@link Ichos.UnauthorizedError}
|
|
311
331
|
* @throws {@link Ichos.ForbiddenError}
|
|
312
332
|
* @throws {@link Ichos.NotFoundError}
|
|
333
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
313
334
|
* @throws {@link Ichos.InternalServerError}
|
|
314
335
|
*
|
|
315
336
|
* @example
|
|
@@ -367,7 +388,7 @@ export class PodcastsClient {
|
|
|
367
388
|
);
|
|
368
389
|
case 403:
|
|
369
390
|
throw new Ichos.ForbiddenError(
|
|
370
|
-
_response.error.body as Ichos.
|
|
391
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
371
392
|
_response.rawResponse,
|
|
372
393
|
);
|
|
373
394
|
case 404:
|
|
@@ -375,6 +396,11 @@ export class PodcastsClient {
|
|
|
375
396
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
376
397
|
_response.rawResponse,
|
|
377
398
|
);
|
|
399
|
+
case 429:
|
|
400
|
+
throw new Ichos.TooManyRequestsError(
|
|
401
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
402
|
+
_response.rawResponse,
|
|
403
|
+
);
|
|
378
404
|
case 500:
|
|
379
405
|
throw new Ichos.InternalServerError(
|
|
380
406
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -401,6 +427,7 @@ export class PodcastsClient {
|
|
|
401
427
|
* @throws {@link Ichos.UnauthorizedError}
|
|
402
428
|
* @throws {@link Ichos.ForbiddenError}
|
|
403
429
|
* @throws {@link Ichos.NotFoundError}
|
|
430
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
404
431
|
* @throws {@link Ichos.InternalServerError}
|
|
405
432
|
*
|
|
406
433
|
* @example
|
|
@@ -456,7 +483,7 @@ export class PodcastsClient {
|
|
|
456
483
|
);
|
|
457
484
|
case 403:
|
|
458
485
|
throw new Ichos.ForbiddenError(
|
|
459
|
-
_response.error.body as Ichos.
|
|
486
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
460
487
|
_response.rawResponse,
|
|
461
488
|
);
|
|
462
489
|
case 404:
|
|
@@ -464,6 +491,11 @@ export class PodcastsClient {
|
|
|
464
491
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
465
492
|
_response.rawResponse,
|
|
466
493
|
);
|
|
494
|
+
case 429:
|
|
495
|
+
throw new Ichos.TooManyRequestsError(
|
|
496
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
497
|
+
_response.rawResponse,
|
|
498
|
+
);
|
|
467
499
|
case 500:
|
|
468
500
|
throw new Ichos.InternalServerError(
|
|
469
501
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -495,6 +527,7 @@ export class PodcastsClient {
|
|
|
495
527
|
* @throws {@link Ichos.UnauthorizedError}
|
|
496
528
|
* @throws {@link Ichos.ForbiddenError}
|
|
497
529
|
* @throws {@link Ichos.NotFoundError}
|
|
530
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
498
531
|
* @throws {@link Ichos.InternalServerError}
|
|
499
532
|
*
|
|
500
533
|
* @example
|
|
@@ -554,7 +587,7 @@ export class PodcastsClient {
|
|
|
554
587
|
);
|
|
555
588
|
case 403:
|
|
556
589
|
throw new Ichos.ForbiddenError(
|
|
557
|
-
_response.error.body as Ichos.
|
|
590
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
558
591
|
_response.rawResponse,
|
|
559
592
|
);
|
|
560
593
|
case 404:
|
|
@@ -562,98 +595,9 @@ export class PodcastsClient {
|
|
|
562
595
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
563
596
|
_response.rawResponse,
|
|
564
597
|
);
|
|
565
|
-
case
|
|
566
|
-
throw new Ichos.
|
|
567
|
-
_response.error.body as Ichos.
|
|
568
|
-
_response.rawResponse,
|
|
569
|
-
);
|
|
570
|
-
default:
|
|
571
|
-
throw new errors.IchosError({
|
|
572
|
-
statusCode: _response.error.statusCode,
|
|
573
|
-
body: _response.error.body,
|
|
574
|
-
rawResponse: _response.rawResponse,
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
return handleNonStatusCodeError(
|
|
580
|
-
_response.error,
|
|
581
|
-
_response.rawResponse,
|
|
582
|
-
"POST",
|
|
583
|
-
"/v1/podcasts/{podcastId}/cover/pull",
|
|
584
|
-
);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Retrieve the current cover image URL for a podcast.
|
|
589
|
-
*
|
|
590
|
-
* @param {Ichos.GetPodcastCoverRequest} request
|
|
591
|
-
* @param {PodcastsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
592
|
-
*
|
|
593
|
-
* @throws {@link Ichos.UnauthorizedError}
|
|
594
|
-
* @throws {@link Ichos.ForbiddenError}
|
|
595
|
-
* @throws {@link Ichos.NotFoundError}
|
|
596
|
-
* @throws {@link Ichos.InternalServerError}
|
|
597
|
-
*
|
|
598
|
-
* @example
|
|
599
|
-
* await client.podcasts.getPodcastCover({
|
|
600
|
-
* podcastId: "podcastId"
|
|
601
|
-
* })
|
|
602
|
-
*/
|
|
603
|
-
public getPodcastCover(
|
|
604
|
-
request: Ichos.GetPodcastCoverRequest,
|
|
605
|
-
requestOptions?: PodcastsClient.RequestOptions,
|
|
606
|
-
): core.HttpResponsePromise<Ichos.StringOrNullResponse> {
|
|
607
|
-
return core.HttpResponsePromise.fromPromise(this.__getPodcastCover(request, requestOptions));
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
private async __getPodcastCover(
|
|
611
|
-
request: Ichos.GetPodcastCoverRequest,
|
|
612
|
-
requestOptions?: PodcastsClient.RequestOptions,
|
|
613
|
-
): Promise<core.WithRawResponse<Ichos.StringOrNullResponse>> {
|
|
614
|
-
const { podcastId } = request;
|
|
615
|
-
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
616
|
-
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
617
|
-
_authRequest.headers,
|
|
618
|
-
this._options?.headers,
|
|
619
|
-
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
620
|
-
requestOptions?.headers,
|
|
621
|
-
);
|
|
622
|
-
const _response = await core.fetcher({
|
|
623
|
-
url: core.url.join(
|
|
624
|
-
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
625
|
-
(await core.Supplier.get(this._options.environment)) ??
|
|
626
|
-
environments.IchosEnvironment.Default,
|
|
627
|
-
`v1/podcasts/${core.url.encodePathParam(podcastId)}/cover`,
|
|
628
|
-
),
|
|
629
|
-
method: "GET",
|
|
630
|
-
headers: _headers,
|
|
631
|
-
queryParameters: requestOptions?.queryParams,
|
|
632
|
-
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
633
|
-
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
634
|
-
abortSignal: requestOptions?.abortSignal,
|
|
635
|
-
fetchFn: this._options?.fetch,
|
|
636
|
-
logging: this._options.logging,
|
|
637
|
-
});
|
|
638
|
-
if (_response.ok) {
|
|
639
|
-
return { data: _response.body as Ichos.StringOrNullResponse, rawResponse: _response.rawResponse };
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
if (_response.error.reason === "status-code") {
|
|
643
|
-
switch (_response.error.statusCode) {
|
|
644
|
-
case 401:
|
|
645
|
-
throw new Ichos.UnauthorizedError(
|
|
646
|
-
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
647
|
-
_response.rawResponse,
|
|
648
|
-
);
|
|
649
|
-
case 403:
|
|
650
|
-
throw new Ichos.ForbiddenError(
|
|
651
|
-
_response.error.body as Ichos.UnauthenticatedErrorResponse,
|
|
652
|
-
_response.rawResponse,
|
|
653
|
-
);
|
|
654
|
-
case 404:
|
|
655
|
-
throw new Ichos.NotFoundError(
|
|
656
|
-
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
598
|
+
case 429:
|
|
599
|
+
throw new Ichos.TooManyRequestsError(
|
|
600
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
657
601
|
_response.rawResponse,
|
|
658
602
|
);
|
|
659
603
|
case 500:
|
|
@@ -673,8 +617,8 @@ export class PodcastsClient {
|
|
|
673
617
|
return handleNonStatusCodeError(
|
|
674
618
|
_response.error,
|
|
675
619
|
_response.rawResponse,
|
|
676
|
-
"
|
|
677
|
-
"/v1/podcasts/{podcastId}/cover",
|
|
620
|
+
"POST",
|
|
621
|
+
"/v1/podcasts/{podcastId}/cover/pull",
|
|
678
622
|
);
|
|
679
623
|
}
|
|
680
624
|
|
|
@@ -687,6 +631,7 @@ export class PodcastsClient {
|
|
|
687
631
|
* @throws {@link Ichos.UnauthorizedError}
|
|
688
632
|
* @throws {@link Ichos.ForbiddenError}
|
|
689
633
|
* @throws {@link Ichos.NotFoundError}
|
|
634
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
690
635
|
* @throws {@link Ichos.InternalServerError}
|
|
691
636
|
*
|
|
692
637
|
* @example
|
|
@@ -742,7 +687,7 @@ export class PodcastsClient {
|
|
|
742
687
|
);
|
|
743
688
|
case 403:
|
|
744
689
|
throw new Ichos.ForbiddenError(
|
|
745
|
-
_response.error.body as Ichos.
|
|
690
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
746
691
|
_response.rawResponse,
|
|
747
692
|
);
|
|
748
693
|
case 404:
|
|
@@ -750,6 +695,11 @@ export class PodcastsClient {
|
|
|
750
695
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
751
696
|
_response.rawResponse,
|
|
752
697
|
);
|
|
698
|
+
case 429:
|
|
699
|
+
throw new Ichos.TooManyRequestsError(
|
|
700
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
701
|
+
_response.rawResponse,
|
|
702
|
+
);
|
|
753
703
|
case 500:
|
|
754
704
|
throw new Ichos.InternalServerError(
|
|
755
705
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -776,6 +726,7 @@ export class PodcastsClient {
|
|
|
776
726
|
* @throws {@link Ichos.UnauthorizedError}
|
|
777
727
|
* @throws {@link Ichos.ForbiddenError}
|
|
778
728
|
* @throws {@link Ichos.NotFoundError}
|
|
729
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
779
730
|
* @throws {@link Ichos.InternalServerError}
|
|
780
731
|
*
|
|
781
732
|
* @example
|
|
@@ -831,7 +782,7 @@ export class PodcastsClient {
|
|
|
831
782
|
);
|
|
832
783
|
case 403:
|
|
833
784
|
throw new Ichos.ForbiddenError(
|
|
834
|
-
_response.error.body as Ichos.
|
|
785
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
835
786
|
_response.rawResponse,
|
|
836
787
|
);
|
|
837
788
|
case 404:
|
|
@@ -839,6 +790,11 @@ export class PodcastsClient {
|
|
|
839
790
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
840
791
|
_response.rawResponse,
|
|
841
792
|
);
|
|
793
|
+
case 429:
|
|
794
|
+
throw new Ichos.TooManyRequestsError(
|
|
795
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
796
|
+
_response.rawResponse,
|
|
797
|
+
);
|
|
842
798
|
case 500:
|
|
843
799
|
throw new Ichos.InternalServerError(
|
|
844
800
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -865,6 +821,7 @@ export class PodcastsClient {
|
|
|
865
821
|
* @throws {@link Ichos.UnauthorizedError}
|
|
866
822
|
* @throws {@link Ichos.ForbiddenError}
|
|
867
823
|
* @throws {@link Ichos.NotFoundError}
|
|
824
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
868
825
|
* @throws {@link Ichos.InternalServerError}
|
|
869
826
|
*
|
|
870
827
|
* @example
|
|
@@ -923,7 +880,7 @@ export class PodcastsClient {
|
|
|
923
880
|
);
|
|
924
881
|
case 403:
|
|
925
882
|
throw new Ichos.ForbiddenError(
|
|
926
|
-
_response.error.body as Ichos.
|
|
883
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
927
884
|
_response.rawResponse,
|
|
928
885
|
);
|
|
929
886
|
case 404:
|
|
@@ -931,6 +888,11 @@ export class PodcastsClient {
|
|
|
931
888
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
932
889
|
_response.rawResponse,
|
|
933
890
|
);
|
|
891
|
+
case 429:
|
|
892
|
+
throw new Ichos.TooManyRequestsError(
|
|
893
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
894
|
+
_response.rawResponse,
|
|
895
|
+
);
|
|
934
896
|
case 500:
|
|
935
897
|
throw new Ichos.InternalServerError(
|
|
936
898
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -958,6 +920,7 @@ export class PodcastsClient {
|
|
|
958
920
|
* @throws {@link Ichos.UnauthorizedError}
|
|
959
921
|
* @throws {@link Ichos.ForbiddenError}
|
|
960
922
|
* @throws {@link Ichos.NotFoundError}
|
|
923
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
961
924
|
* @throws {@link Ichos.InternalServerError}
|
|
962
925
|
*
|
|
963
926
|
* @example
|
|
@@ -1013,7 +976,7 @@ export class PodcastsClient {
|
|
|
1013
976
|
);
|
|
1014
977
|
case 403:
|
|
1015
978
|
throw new Ichos.ForbiddenError(
|
|
1016
|
-
_response.error.body as Ichos.
|
|
979
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1017
980
|
_response.rawResponse,
|
|
1018
981
|
);
|
|
1019
982
|
case 404:
|
|
@@ -1021,6 +984,11 @@ export class PodcastsClient {
|
|
|
1021
984
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1022
985
|
_response.rawResponse,
|
|
1023
986
|
);
|
|
987
|
+
case 429:
|
|
988
|
+
throw new Ichos.TooManyRequestsError(
|
|
989
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
990
|
+
_response.rawResponse,
|
|
991
|
+
);
|
|
1024
992
|
case 500:
|
|
1025
993
|
throw new Ichos.InternalServerError(
|
|
1026
994
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1047,6 +1015,7 @@ export class PodcastsClient {
|
|
|
1047
1015
|
* @throws {@link Ichos.UnauthorizedError}
|
|
1048
1016
|
* @throws {@link Ichos.ForbiddenError}
|
|
1049
1017
|
* @throws {@link Ichos.NotFoundError}
|
|
1018
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1050
1019
|
* @throws {@link Ichos.InternalServerError}
|
|
1051
1020
|
*
|
|
1052
1021
|
* @example
|
|
@@ -1102,7 +1071,7 @@ export class PodcastsClient {
|
|
|
1102
1071
|
);
|
|
1103
1072
|
case 403:
|
|
1104
1073
|
throw new Ichos.ForbiddenError(
|
|
1105
|
-
_response.error.body as Ichos.
|
|
1074
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1106
1075
|
_response.rawResponse,
|
|
1107
1076
|
);
|
|
1108
1077
|
case 404:
|
|
@@ -1110,6 +1079,11 @@ export class PodcastsClient {
|
|
|
1110
1079
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1111
1080
|
_response.rawResponse,
|
|
1112
1081
|
);
|
|
1082
|
+
case 429:
|
|
1083
|
+
throw new Ichos.TooManyRequestsError(
|
|
1084
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1085
|
+
_response.rawResponse,
|
|
1086
|
+
);
|
|
1113
1087
|
case 500:
|
|
1114
1088
|
throw new Ichos.InternalServerError(
|
|
1115
1089
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1141,6 +1115,7 @@ export class PodcastsClient {
|
|
|
1141
1115
|
* @throws {@link Ichos.UnauthorizedError}
|
|
1142
1116
|
* @throws {@link Ichos.ForbiddenError}
|
|
1143
1117
|
* @throws {@link Ichos.NotFoundError}
|
|
1118
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1144
1119
|
* @throws {@link Ichos.InternalServerError}
|
|
1145
1120
|
*
|
|
1146
1121
|
* @example
|
|
@@ -1151,14 +1126,14 @@ export class PodcastsClient {
|
|
|
1151
1126
|
public publishPodcast(
|
|
1152
1127
|
request: Ichos.PublishPodcastRequest,
|
|
1153
1128
|
requestOptions?: PodcastsClient.RequestOptions,
|
|
1154
|
-
): core.HttpResponsePromise<Ichos.
|
|
1129
|
+
): core.HttpResponsePromise<Ichos.PublishPodcastResponse> {
|
|
1155
1130
|
return core.HttpResponsePromise.fromPromise(this.__publishPodcast(request, requestOptions));
|
|
1156
1131
|
}
|
|
1157
1132
|
|
|
1158
1133
|
private async __publishPodcast(
|
|
1159
1134
|
request: Ichos.PublishPodcastRequest,
|
|
1160
1135
|
requestOptions?: PodcastsClient.RequestOptions,
|
|
1161
|
-
): Promise<core.WithRawResponse<Ichos.
|
|
1136
|
+
): Promise<core.WithRawResponse<Ichos.PublishPodcastResponse>> {
|
|
1162
1137
|
const { podcastId } = request;
|
|
1163
1138
|
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
1164
1139
|
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
@@ -1184,7 +1159,7 @@ export class PodcastsClient {
|
|
|
1184
1159
|
logging: this._options.logging,
|
|
1185
1160
|
});
|
|
1186
1161
|
if (_response.ok) {
|
|
1187
|
-
return { data: _response.body as Ichos.
|
|
1162
|
+
return { data: _response.body as Ichos.PublishPodcastResponse, rawResponse: _response.rawResponse };
|
|
1188
1163
|
}
|
|
1189
1164
|
|
|
1190
1165
|
if (_response.error.reason === "status-code") {
|
|
@@ -1196,7 +1171,7 @@ export class PodcastsClient {
|
|
|
1196
1171
|
);
|
|
1197
1172
|
case 403:
|
|
1198
1173
|
throw new Ichos.ForbiddenError(
|
|
1199
|
-
_response.error.body as Ichos.
|
|
1174
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1200
1175
|
_response.rawResponse,
|
|
1201
1176
|
);
|
|
1202
1177
|
case 404:
|
|
@@ -1204,6 +1179,11 @@ export class PodcastsClient {
|
|
|
1204
1179
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1205
1180
|
_response.rawResponse,
|
|
1206
1181
|
);
|
|
1182
|
+
case 429:
|
|
1183
|
+
throw new Ichos.TooManyRequestsError(
|
|
1184
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1185
|
+
_response.rawResponse,
|
|
1186
|
+
);
|
|
1207
1187
|
case 500:
|
|
1208
1188
|
throw new Ichos.InternalServerError(
|
|
1209
1189
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1235,6 +1215,7 @@ export class PodcastsClient {
|
|
|
1235
1215
|
* @throws {@link Ichos.UnauthorizedError}
|
|
1236
1216
|
* @throws {@link Ichos.ForbiddenError}
|
|
1237
1217
|
* @throws {@link Ichos.NotFoundError}
|
|
1218
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1238
1219
|
* @throws {@link Ichos.InternalServerError}
|
|
1239
1220
|
*
|
|
1240
1221
|
* @example
|
|
@@ -1290,7 +1271,7 @@ export class PodcastsClient {
|
|
|
1290
1271
|
);
|
|
1291
1272
|
case 403:
|
|
1292
1273
|
throw new Ichos.ForbiddenError(
|
|
1293
|
-
_response.error.body as Ichos.
|
|
1274
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1294
1275
|
_response.rawResponse,
|
|
1295
1276
|
);
|
|
1296
1277
|
case 404:
|
|
@@ -1298,6 +1279,11 @@ export class PodcastsClient {
|
|
|
1298
1279
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1299
1280
|
_response.rawResponse,
|
|
1300
1281
|
);
|
|
1282
|
+
case 429:
|
|
1283
|
+
throw new Ichos.TooManyRequestsError(
|
|
1284
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1285
|
+
_response.rawResponse,
|
|
1286
|
+
);
|
|
1301
1287
|
case 500:
|
|
1302
1288
|
throw new Ichos.InternalServerError(
|
|
1303
1289
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1319,4 +1305,100 @@ export class PodcastsClient {
|
|
|
1319
1305
|
"/v1/podcasts/{podcastId}/analytics/listens",
|
|
1320
1306
|
);
|
|
1321
1307
|
}
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Get the average monthly listeners for a podcast, calculated from the unique listeners in the report.
|
|
1311
|
+
* If the report spans less than 30 days, or only contains data for a single month,
|
|
1312
|
+
* this will return the total unique listeners in the report.
|
|
1313
|
+
*
|
|
1314
|
+
* @param {Ichos.GetAverageMonthlyListenersRequest} request
|
|
1315
|
+
* @param {PodcastsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1316
|
+
*
|
|
1317
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
1318
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
1319
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1320
|
+
* @throws {@link Ichos.InternalServerError}
|
|
1321
|
+
*
|
|
1322
|
+
* @example
|
|
1323
|
+
* await client.podcasts.getAverageMonthlyListeners({
|
|
1324
|
+
* podcastId: "podcastId"
|
|
1325
|
+
* })
|
|
1326
|
+
*/
|
|
1327
|
+
public getAverageMonthlyListeners(
|
|
1328
|
+
request: Ichos.GetAverageMonthlyListenersRequest,
|
|
1329
|
+
requestOptions?: PodcastsClient.RequestOptions,
|
|
1330
|
+
): core.HttpResponsePromise<Ichos.MonthlyListenersResponse> {
|
|
1331
|
+
return core.HttpResponsePromise.fromPromise(this.__getAverageMonthlyListeners(request, requestOptions));
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
private async __getAverageMonthlyListeners(
|
|
1335
|
+
request: Ichos.GetAverageMonthlyListenersRequest,
|
|
1336
|
+
requestOptions?: PodcastsClient.RequestOptions,
|
|
1337
|
+
): Promise<core.WithRawResponse<Ichos.MonthlyListenersResponse>> {
|
|
1338
|
+
const { podcastId } = request;
|
|
1339
|
+
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
1340
|
+
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
1341
|
+
_authRequest.headers,
|
|
1342
|
+
this._options?.headers,
|
|
1343
|
+
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
1344
|
+
requestOptions?.headers,
|
|
1345
|
+
);
|
|
1346
|
+
const _response = await core.fetcher({
|
|
1347
|
+
url: core.url.join(
|
|
1348
|
+
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
1349
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
1350
|
+
environments.IchosEnvironment.Default,
|
|
1351
|
+
`v1/analytics/${core.url.encodePathParam(podcastId)}/monthly-listeners`,
|
|
1352
|
+
),
|
|
1353
|
+
method: "GET",
|
|
1354
|
+
headers: _headers,
|
|
1355
|
+
queryParameters: requestOptions?.queryParams,
|
|
1356
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
1357
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
1358
|
+
abortSignal: requestOptions?.abortSignal,
|
|
1359
|
+
fetchFn: this._options?.fetch,
|
|
1360
|
+
logging: this._options.logging,
|
|
1361
|
+
});
|
|
1362
|
+
if (_response.ok) {
|
|
1363
|
+
return { data: _response.body as Ichos.MonthlyListenersResponse, rawResponse: _response.rawResponse };
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
if (_response.error.reason === "status-code") {
|
|
1367
|
+
switch (_response.error.statusCode) {
|
|
1368
|
+
case 401:
|
|
1369
|
+
throw new Ichos.UnauthorizedError(
|
|
1370
|
+
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
1371
|
+
_response.rawResponse,
|
|
1372
|
+
);
|
|
1373
|
+
case 403:
|
|
1374
|
+
throw new Ichos.ForbiddenError(
|
|
1375
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1376
|
+
_response.rawResponse,
|
|
1377
|
+
);
|
|
1378
|
+
case 429:
|
|
1379
|
+
throw new Ichos.TooManyRequestsError(
|
|
1380
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1381
|
+
_response.rawResponse,
|
|
1382
|
+
);
|
|
1383
|
+
case 500:
|
|
1384
|
+
throw new Ichos.InternalServerError(
|
|
1385
|
+
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
1386
|
+
_response.rawResponse,
|
|
1387
|
+
);
|
|
1388
|
+
default:
|
|
1389
|
+
throw new errors.IchosError({
|
|
1390
|
+
statusCode: _response.error.statusCode,
|
|
1391
|
+
body: _response.error.body,
|
|
1392
|
+
rawResponse: _response.rawResponse,
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
return handleNonStatusCodeError(
|
|
1398
|
+
_response.error,
|
|
1399
|
+
_response.rawResponse,
|
|
1400
|
+
"GET",
|
|
1401
|
+
"/v1/analytics/{podcastId}/monthly-listeners",
|
|
1402
|
+
);
|
|
1403
|
+
}
|
|
1322
1404
|
}
|
|
@@ -5,8 +5,7 @@ import type * as Ichos from "../../../../index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* title: "The Tech Wave"
|
|
9
|
-
* explicit: false
|
|
8
|
+
* title: "The Tech Wave"
|
|
10
9
|
* }
|
|
11
10
|
*/
|
|
12
11
|
export interface PodcastCreate {
|
|
@@ -21,14 +20,17 @@ export interface PodcastCreate {
|
|
|
21
20
|
link?: string | null;
|
|
22
21
|
/** A detailed description of the podcast. */
|
|
23
22
|
description?: string | null;
|
|
24
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The language of the podcast (ISO 639-1 code). Will default to
|
|
25
|
+
* the organization's default language if not provided.
|
|
26
|
+
*/
|
|
25
27
|
language?: string | null;
|
|
26
28
|
/** Whether ads are enabled for the podcast. */
|
|
27
29
|
adsEnabled?: boolean;
|
|
28
30
|
/** Categories associated with the podcast. */
|
|
29
31
|
categories?: Ichos.ApplePodcastCategory[] | null;
|
|
30
32
|
/** Whether the podcast contains explicit content. */
|
|
31
|
-
explicit
|
|
33
|
+
explicit?: boolean;
|
|
32
34
|
/** The author of the podcast. */
|
|
33
35
|
author?: string | null;
|
|
34
36
|
/** The name of the podcast owner. */
|
|
@@ -52,6 +54,7 @@ export interface PodcastCreate {
|
|
|
52
54
|
/** The text to display for the funding link. */
|
|
53
55
|
fundingText?: string | null;
|
|
54
56
|
metadata?: Ichos.Metadata;
|
|
57
|
+
coverOptions?: Ichos.CoverUploadOptions;
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
export namespace PodcastCreate {
|
|
@@ -22,7 +22,10 @@ export interface PodcastUpdate {
|
|
|
22
22
|
link?: string;
|
|
23
23
|
/** A detailed description of the podcast. */
|
|
24
24
|
description?: string;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* The language of the podcast (ISO 639-1 code). Will default to
|
|
27
|
+
* the organization's default language if not provided.
|
|
28
|
+
*/
|
|
26
29
|
language?: string;
|
|
27
30
|
/** Whether ads are enabled for the podcast. */
|
|
28
31
|
adsEnabled?: boolean;
|
|
@@ -53,6 +56,7 @@ export interface PodcastUpdate {
|
|
|
53
56
|
/** The text to display for the funding link. */
|
|
54
57
|
fundingText?: string;
|
|
55
58
|
metadata?: Ichos.Metadata;
|
|
59
|
+
coverOptions?: Ichos.CoverUploadOptions;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
export namespace PodcastUpdate {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { DeletePodcastRequest } from "./DeletePodcastRequest.js";
|
|
2
2
|
export type { GeneratePodcastCoverUploadUrlRequest } from "./GeneratePodcastCoverUploadUrlRequest.js";
|
|
3
|
-
export type {
|
|
3
|
+
export type { GetAverageMonthlyListenersRequest } from "./GetAverageMonthlyListenersRequest.js";
|
|
4
4
|
export type { GetPodcastListenersReportRequest } from "./GetPodcastListenersReportRequest.js";
|
|
5
5
|
export type { GetPodcastRequest } from "./GetPodcastRequest.js";
|
|
6
6
|
export type { GetPodcastRssRequest } from "./GetPodcastRssRequest.js";
|