@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
|
@@ -5,7 +5,7 @@ import * as errors from "../../errors/index.js";
|
|
|
5
5
|
import type * as Ichos from "../index.js";
|
|
6
6
|
|
|
7
7
|
export class ForbiddenError extends errors.IchosError {
|
|
8
|
-
constructor(body: Ichos.
|
|
8
|
+
constructor(body: Ichos.ForbiddenErrorResponse, rawResponse?: core.RawResponse) {
|
|
9
9
|
super({
|
|
10
10
|
message: "ForbiddenError",
|
|
11
11
|
statusCode: 403,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import type * as core from "../../core/index.js";
|
|
4
|
+
import * as errors from "../../errors/index.js";
|
|
5
|
+
import type * as Ichos from "../index.js";
|
|
6
|
+
|
|
7
|
+
export class TooManyRequestsError extends errors.IchosError {
|
|
8
|
+
constructor(body: Ichos.TooManyRequestsErrorResponse, rawResponse?: core.RawResponse) {
|
|
9
|
+
super({
|
|
10
|
+
message: "TooManyRequestsError",
|
|
11
|
+
statusCode: 429,
|
|
12
|
+
body: body,
|
|
13
|
+
rawResponse: rawResponse,
|
|
14
|
+
});
|
|
15
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
16
|
+
if (Error.captureStackTrace) {
|
|
17
|
+
Error.captureStackTrace(this, this.constructor);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
this.name = this.constructor.name;
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/api/errors/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from "./BadRequestError.js";
|
|
1
2
|
export * from "./ForbiddenError.js";
|
|
2
3
|
export * from "./InternalServerError.js";
|
|
3
4
|
export * from "./NotFoundError.js";
|
|
5
|
+
export * from "./TooManyRequestsError.js";
|
|
4
6
|
export * from "./UnauthorizedError.js";
|
|
5
7
|
export * from "./UnprocessableEntityError.js";
|
|
@@ -33,6 +33,7 @@ export class AdsClient {
|
|
|
33
33
|
*
|
|
34
34
|
* @throws {@link Ichos.UnauthorizedError}
|
|
35
35
|
* @throws {@link Ichos.ForbiddenError}
|
|
36
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
36
37
|
* @throws {@link Ichos.InternalServerError}
|
|
37
38
|
*
|
|
38
39
|
* @example
|
|
@@ -93,7 +94,12 @@ export class AdsClient {
|
|
|
93
94
|
);
|
|
94
95
|
case 403:
|
|
95
96
|
throw new Ichos.ForbiddenError(
|
|
96
|
-
_response.error.body as Ichos.
|
|
97
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
98
|
+
_response.rawResponse,
|
|
99
|
+
);
|
|
100
|
+
case 429:
|
|
101
|
+
throw new Ichos.TooManyRequestsError(
|
|
102
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
97
103
|
_response.rawResponse,
|
|
98
104
|
);
|
|
99
105
|
case 500:
|
|
@@ -123,6 +129,7 @@ export class AdsClient {
|
|
|
123
129
|
* @throws {@link Ichos.UnauthorizedError}
|
|
124
130
|
* @throws {@link Ichos.ForbiddenError}
|
|
125
131
|
* @throws {@link Ichos.NotFoundError}
|
|
132
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
126
133
|
* @throws {@link Ichos.InternalServerError}
|
|
127
134
|
*
|
|
128
135
|
* @example
|
|
@@ -183,7 +190,7 @@ export class AdsClient {
|
|
|
183
190
|
);
|
|
184
191
|
case 403:
|
|
185
192
|
throw new Ichos.ForbiddenError(
|
|
186
|
-
_response.error.body as Ichos.
|
|
193
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
187
194
|
_response.rawResponse,
|
|
188
195
|
);
|
|
189
196
|
case 404:
|
|
@@ -191,6 +198,11 @@ export class AdsClient {
|
|
|
191
198
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
192
199
|
_response.rawResponse,
|
|
193
200
|
);
|
|
201
|
+
case 429:
|
|
202
|
+
throw new Ichos.TooManyRequestsError(
|
|
203
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
204
|
+
_response.rawResponse,
|
|
205
|
+
);
|
|
194
206
|
case 500:
|
|
195
207
|
throw new Ichos.InternalServerError(
|
|
196
208
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -216,6 +228,7 @@ export class AdsClient {
|
|
|
216
228
|
*
|
|
217
229
|
* @throws {@link Ichos.UnauthorizedError}
|
|
218
230
|
* @throws {@link Ichos.ForbiddenError}
|
|
231
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
219
232
|
* @throws {@link Ichos.InternalServerError}
|
|
220
233
|
*
|
|
221
234
|
* @example
|
|
@@ -274,7 +287,12 @@ export class AdsClient {
|
|
|
274
287
|
);
|
|
275
288
|
case 403:
|
|
276
289
|
throw new Ichos.ForbiddenError(
|
|
277
|
-
_response.error.body as Ichos.
|
|
290
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
291
|
+
_response.rawResponse,
|
|
292
|
+
);
|
|
293
|
+
case 429:
|
|
294
|
+
throw new Ichos.TooManyRequestsError(
|
|
295
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
278
296
|
_response.rawResponse,
|
|
279
297
|
);
|
|
280
298
|
case 500:
|
|
@@ -303,6 +321,7 @@ export class AdsClient {
|
|
|
303
321
|
*
|
|
304
322
|
* @throws {@link Ichos.UnauthorizedError}
|
|
305
323
|
* @throws {@link Ichos.ForbiddenError}
|
|
324
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
306
325
|
* @throws {@link Ichos.InternalServerError}
|
|
307
326
|
*
|
|
308
327
|
* @example
|
|
@@ -362,7 +381,12 @@ export class AdsClient {
|
|
|
362
381
|
);
|
|
363
382
|
case 403:
|
|
364
383
|
throw new Ichos.ForbiddenError(
|
|
365
|
-
_response.error.body as Ichos.
|
|
384
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
385
|
+
_response.rawResponse,
|
|
386
|
+
);
|
|
387
|
+
case 429:
|
|
388
|
+
throw new Ichos.TooManyRequestsError(
|
|
389
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
366
390
|
_response.rawResponse,
|
|
367
391
|
);
|
|
368
392
|
case 500:
|
|
@@ -390,6 +414,7 @@ export class AdsClient {
|
|
|
390
414
|
* @throws {@link Ichos.UnauthorizedError}
|
|
391
415
|
* @throws {@link Ichos.ForbiddenError}
|
|
392
416
|
* @throws {@link Ichos.NotFoundError}
|
|
417
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
393
418
|
* @throws {@link Ichos.InternalServerError}
|
|
394
419
|
*
|
|
395
420
|
* @example
|
|
@@ -440,7 +465,7 @@ export class AdsClient {
|
|
|
440
465
|
);
|
|
441
466
|
case 403:
|
|
442
467
|
throw new Ichos.ForbiddenError(
|
|
443
|
-
_response.error.body as Ichos.
|
|
468
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
444
469
|
_response.rawResponse,
|
|
445
470
|
);
|
|
446
471
|
case 404:
|
|
@@ -448,6 +473,11 @@ export class AdsClient {
|
|
|
448
473
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
449
474
|
_response.rawResponse,
|
|
450
475
|
);
|
|
476
|
+
case 429:
|
|
477
|
+
throw new Ichos.TooManyRequestsError(
|
|
478
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
479
|
+
_response.rawResponse,
|
|
480
|
+
);
|
|
451
481
|
case 500:
|
|
452
482
|
throw new Ichos.InternalServerError(
|
|
453
483
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -474,6 +504,7 @@ export class AdsClient {
|
|
|
474
504
|
* @throws {@link Ichos.UnauthorizedError}
|
|
475
505
|
* @throws {@link Ichos.ForbiddenError}
|
|
476
506
|
* @throws {@link Ichos.NotFoundError}
|
|
507
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
477
508
|
* @throws {@link Ichos.InternalServerError}
|
|
478
509
|
*
|
|
479
510
|
* @example
|
|
@@ -532,7 +563,7 @@ export class AdsClient {
|
|
|
532
563
|
);
|
|
533
564
|
case 403:
|
|
534
565
|
throw new Ichos.ForbiddenError(
|
|
535
|
-
_response.error.body as Ichos.
|
|
566
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
536
567
|
_response.rawResponse,
|
|
537
568
|
);
|
|
538
569
|
case 404:
|
|
@@ -540,6 +571,11 @@ export class AdsClient {
|
|
|
540
571
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
541
572
|
_response.rawResponse,
|
|
542
573
|
);
|
|
574
|
+
case 429:
|
|
575
|
+
throw new Ichos.TooManyRequestsError(
|
|
576
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
577
|
+
_response.rawResponse,
|
|
578
|
+
);
|
|
543
579
|
case 500:
|
|
544
580
|
throw new Ichos.InternalServerError(
|
|
545
581
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -565,6 +601,7 @@ export class AdsClient {
|
|
|
565
601
|
* @throws {@link Ichos.UnauthorizedError}
|
|
566
602
|
* @throws {@link Ichos.ForbiddenError}
|
|
567
603
|
* @throws {@link Ichos.NotFoundError}
|
|
604
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
568
605
|
* @throws {@link Ichos.InternalServerError}
|
|
569
606
|
*
|
|
570
607
|
* @example
|
|
@@ -615,7 +652,7 @@ export class AdsClient {
|
|
|
615
652
|
);
|
|
616
653
|
case 403:
|
|
617
654
|
throw new Ichos.ForbiddenError(
|
|
618
|
-
_response.error.body as Ichos.
|
|
655
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
619
656
|
_response.rawResponse,
|
|
620
657
|
);
|
|
621
658
|
case 404:
|
|
@@ -623,6 +660,11 @@ export class AdsClient {
|
|
|
623
660
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
624
661
|
_response.rawResponse,
|
|
625
662
|
);
|
|
663
|
+
case 429:
|
|
664
|
+
throw new Ichos.TooManyRequestsError(
|
|
665
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
666
|
+
_response.rawResponse,
|
|
667
|
+
);
|
|
626
668
|
case 500:
|
|
627
669
|
throw new Ichos.InternalServerError(
|
|
628
670
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -649,6 +691,7 @@ export class AdsClient {
|
|
|
649
691
|
* @throws {@link Ichos.UnauthorizedError}
|
|
650
692
|
* @throws {@link Ichos.ForbiddenError}
|
|
651
693
|
* @throws {@link Ichos.NotFoundError}
|
|
694
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
652
695
|
* @throws {@link Ichos.InternalServerError}
|
|
653
696
|
*
|
|
654
697
|
* @example
|
|
@@ -706,7 +749,7 @@ export class AdsClient {
|
|
|
706
749
|
);
|
|
707
750
|
case 403:
|
|
708
751
|
throw new Ichos.ForbiddenError(
|
|
709
|
-
_response.error.body as Ichos.
|
|
752
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
710
753
|
_response.rawResponse,
|
|
711
754
|
);
|
|
712
755
|
case 404:
|
|
@@ -714,6 +757,11 @@ export class AdsClient {
|
|
|
714
757
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
715
758
|
_response.rawResponse,
|
|
716
759
|
);
|
|
760
|
+
case 429:
|
|
761
|
+
throw new Ichos.TooManyRequestsError(
|
|
762
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
763
|
+
_response.rawResponse,
|
|
764
|
+
);
|
|
717
765
|
case 500:
|
|
718
766
|
throw new Ichos.InternalServerError(
|
|
719
767
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -739,6 +787,7 @@ export class AdsClient {
|
|
|
739
787
|
* @throws {@link Ichos.UnauthorizedError}
|
|
740
788
|
* @throws {@link Ichos.ForbiddenError}
|
|
741
789
|
* @throws {@link Ichos.NotFoundError}
|
|
790
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
742
791
|
* @throws {@link Ichos.InternalServerError}
|
|
743
792
|
*
|
|
744
793
|
* @example
|
|
@@ -789,7 +838,7 @@ export class AdsClient {
|
|
|
789
838
|
);
|
|
790
839
|
case 403:
|
|
791
840
|
throw new Ichos.ForbiddenError(
|
|
792
|
-
_response.error.body as Ichos.
|
|
841
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
793
842
|
_response.rawResponse,
|
|
794
843
|
);
|
|
795
844
|
case 404:
|
|
@@ -797,6 +846,11 @@ export class AdsClient {
|
|
|
797
846
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
798
847
|
_response.rawResponse,
|
|
799
848
|
);
|
|
849
|
+
case 429:
|
|
850
|
+
throw new Ichos.TooManyRequestsError(
|
|
851
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
852
|
+
_response.rawResponse,
|
|
853
|
+
);
|
|
800
854
|
case 500:
|
|
801
855
|
throw new Ichos.InternalServerError(
|
|
802
856
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -823,6 +877,7 @@ export class AdsClient {
|
|
|
823
877
|
* @throws {@link Ichos.UnauthorizedError}
|
|
824
878
|
* @throws {@link Ichos.ForbiddenError}
|
|
825
879
|
* @throws {@link Ichos.NotFoundError}
|
|
880
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
826
881
|
* @throws {@link Ichos.InternalServerError}
|
|
827
882
|
*
|
|
828
883
|
* @example
|
|
@@ -881,7 +936,7 @@ export class AdsClient {
|
|
|
881
936
|
);
|
|
882
937
|
case 403:
|
|
883
938
|
throw new Ichos.ForbiddenError(
|
|
884
|
-
_response.error.body as Ichos.
|
|
939
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
885
940
|
_response.rawResponse,
|
|
886
941
|
);
|
|
887
942
|
case 404:
|
|
@@ -889,6 +944,11 @@ export class AdsClient {
|
|
|
889
944
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
890
945
|
_response.rawResponse,
|
|
891
946
|
);
|
|
947
|
+
case 429:
|
|
948
|
+
throw new Ichos.TooManyRequestsError(
|
|
949
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
950
|
+
_response.rawResponse,
|
|
951
|
+
);
|
|
892
952
|
case 500:
|
|
893
953
|
throw new Ichos.InternalServerError(
|
|
894
954
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -915,6 +975,7 @@ export class AdsClient {
|
|
|
915
975
|
* @throws {@link Ichos.UnauthorizedError}
|
|
916
976
|
* @throws {@link Ichos.ForbiddenError}
|
|
917
977
|
* @throws {@link Ichos.NotFoundError}
|
|
978
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
918
979
|
* @throws {@link Ichos.InternalServerError}
|
|
919
980
|
*
|
|
920
981
|
* @example
|
|
@@ -973,7 +1034,7 @@ export class AdsClient {
|
|
|
973
1034
|
);
|
|
974
1035
|
case 403:
|
|
975
1036
|
throw new Ichos.ForbiddenError(
|
|
976
|
-
_response.error.body as Ichos.
|
|
1037
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
977
1038
|
_response.rawResponse,
|
|
978
1039
|
);
|
|
979
1040
|
case 404:
|
|
@@ -981,6 +1042,11 @@ export class AdsClient {
|
|
|
981
1042
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
982
1043
|
_response.rawResponse,
|
|
983
1044
|
);
|
|
1045
|
+
case 429:
|
|
1046
|
+
throw new Ichos.TooManyRequestsError(
|
|
1047
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1048
|
+
_response.rawResponse,
|
|
1049
|
+
);
|
|
984
1050
|
case 500:
|
|
985
1051
|
throw new Ichos.InternalServerError(
|
|
986
1052
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1007,6 +1073,7 @@ export class AdsClient {
|
|
|
1007
1073
|
* @throws {@link Ichos.UnauthorizedError}
|
|
1008
1074
|
* @throws {@link Ichos.ForbiddenError}
|
|
1009
1075
|
* @throws {@link Ichos.NotFoundError}
|
|
1076
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1010
1077
|
* @throws {@link Ichos.InternalServerError}
|
|
1011
1078
|
*
|
|
1012
1079
|
* @example
|
|
@@ -1062,7 +1129,7 @@ export class AdsClient {
|
|
|
1062
1129
|
);
|
|
1063
1130
|
case 403:
|
|
1064
1131
|
throw new Ichos.ForbiddenError(
|
|
1065
|
-
_response.error.body as Ichos.
|
|
1132
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1066
1133
|
_response.rawResponse,
|
|
1067
1134
|
);
|
|
1068
1135
|
case 404:
|
|
@@ -1070,6 +1137,11 @@ export class AdsClient {
|
|
|
1070
1137
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1071
1138
|
_response.rawResponse,
|
|
1072
1139
|
);
|
|
1140
|
+
case 429:
|
|
1141
|
+
throw new Ichos.TooManyRequestsError(
|
|
1142
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1143
|
+
_response.rawResponse,
|
|
1144
|
+
);
|
|
1073
1145
|
case 500:
|
|
1074
1146
|
throw new Ichos.InternalServerError(
|
|
1075
1147
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -15,6 +15,9 @@ export declare namespace AudioClient {
|
|
|
15
15
|
export interface RequestOptions extends BaseRequestOptions {}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Endpoints for managing audio.
|
|
20
|
+
*/
|
|
18
21
|
export class AudioClient {
|
|
19
22
|
protected readonly _options: NormalizedClientOptionsWithAuth<AudioClient.Options>;
|
|
20
23
|
|
|
@@ -30,6 +33,7 @@ export class AudioClient {
|
|
|
30
33
|
* @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
34
|
*
|
|
32
35
|
* @throws {@link Ichos.UnauthorizedError}
|
|
36
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
33
37
|
* @throws {@link Ichos.InternalServerError}
|
|
34
38
|
*
|
|
35
39
|
* @example
|
|
@@ -85,6 +89,11 @@ export class AudioClient {
|
|
|
85
89
|
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
86
90
|
_response.rawResponse,
|
|
87
91
|
);
|
|
92
|
+
case 429:
|
|
93
|
+
throw new Ichos.TooManyRequestsError(
|
|
94
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
95
|
+
_response.rawResponse,
|
|
96
|
+
);
|
|
88
97
|
case 500:
|
|
89
98
|
throw new Ichos.InternalServerError(
|
|
90
99
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -106,23 +115,37 @@ export class AudioClient {
|
|
|
106
115
|
* Generate a signed URL for uploading an audio file.
|
|
107
116
|
* Use the returned URL to PUT the audio file content.
|
|
108
117
|
*
|
|
118
|
+
* @param {Ichos.GenerateAudioUploadUrlRequest} request
|
|
109
119
|
* @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
110
120
|
*
|
|
111
121
|
* @throws {@link Ichos.UnauthorizedError}
|
|
122
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
112
123
|
* @throws {@link Ichos.InternalServerError}
|
|
113
124
|
*
|
|
114
125
|
* @example
|
|
115
126
|
* await client.audio.generateAudioUploadUrl()
|
|
116
127
|
*/
|
|
117
128
|
public generateAudioUploadUrl(
|
|
129
|
+
request: Ichos.GenerateAudioUploadUrlRequest = {},
|
|
118
130
|
requestOptions?: AudioClient.RequestOptions,
|
|
119
131
|
): core.HttpResponsePromise<Ichos.UserUploadAudioResponse> {
|
|
120
|
-
return core.HttpResponsePromise.fromPromise(this.__generateAudioUploadUrl(requestOptions));
|
|
132
|
+
return core.HttpResponsePromise.fromPromise(this.__generateAudioUploadUrl(request, requestOptions));
|
|
121
133
|
}
|
|
122
134
|
|
|
123
135
|
private async __generateAudioUploadUrl(
|
|
136
|
+
request: Ichos.GenerateAudioUploadUrlRequest = {},
|
|
124
137
|
requestOptions?: AudioClient.RequestOptions,
|
|
125
138
|
): Promise<core.WithRawResponse<Ichos.UserUploadAudioResponse>> {
|
|
139
|
+
const { linkTo, linkToId } = request;
|
|
140
|
+
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
|
|
141
|
+
if (linkTo != null) {
|
|
142
|
+
_queryParams.linkTo = linkTo;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (linkToId != null) {
|
|
146
|
+
_queryParams.linkToId = linkToId;
|
|
147
|
+
}
|
|
148
|
+
|
|
126
149
|
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
127
150
|
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
128
151
|
_authRequest.headers,
|
|
@@ -139,7 +162,7 @@ export class AudioClient {
|
|
|
139
162
|
),
|
|
140
163
|
method: "GET",
|
|
141
164
|
headers: _headers,
|
|
142
|
-
queryParameters: requestOptions?.queryParams,
|
|
165
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
143
166
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
144
167
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
145
168
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -157,6 +180,11 @@ export class AudioClient {
|
|
|
157
180
|
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
158
181
|
_response.rawResponse,
|
|
159
182
|
);
|
|
183
|
+
case 429:
|
|
184
|
+
throw new Ichos.TooManyRequestsError(
|
|
185
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
186
|
+
_response.rawResponse,
|
|
187
|
+
);
|
|
160
188
|
case 500:
|
|
161
189
|
throw new Ichos.InternalServerError(
|
|
162
190
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -182,6 +210,7 @@ export class AudioClient {
|
|
|
182
210
|
*
|
|
183
211
|
* @throws {@link Ichos.UnauthorizedError}
|
|
184
212
|
* @throws {@link Ichos.NotFoundError}
|
|
213
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
185
214
|
* @throws {@link Ichos.InternalServerError}
|
|
186
215
|
*
|
|
187
216
|
* @example
|
|
@@ -240,89 +269,9 @@ export class AudioClient {
|
|
|
240
269
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
241
270
|
_response.rawResponse,
|
|
242
271
|
);
|
|
243
|
-
case
|
|
244
|
-
throw new Ichos.
|
|
245
|
-
_response.error.body as Ichos.
|
|
246
|
-
_response.rawResponse,
|
|
247
|
-
);
|
|
248
|
-
default:
|
|
249
|
-
throw new errors.IchosError({
|
|
250
|
-
statusCode: _response.error.statusCode,
|
|
251
|
-
body: _response.error.body,
|
|
252
|
-
rawResponse: _response.rawResponse,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/audio/{audioId}");
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Finalize the creation of an audio resource after the file has been uploaded.
|
|
262
|
-
* Upload completion is detected via storage events.
|
|
263
|
-
*
|
|
264
|
-
* @param {Ichos.FinalizeAudioUploadRequest} request
|
|
265
|
-
* @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
266
|
-
*
|
|
267
|
-
* @throws {@link Ichos.UnauthorizedError}
|
|
268
|
-
* @throws {@link Ichos.InternalServerError}
|
|
269
|
-
*
|
|
270
|
-
* @example
|
|
271
|
-
* await client.audio.finalizeAudioUpload({
|
|
272
|
-
* audioId: "audioId",
|
|
273
|
-
* body: {
|
|
274
|
-
* type: "episode",
|
|
275
|
-
* id: "id"
|
|
276
|
-
* }
|
|
277
|
-
* })
|
|
278
|
-
*/
|
|
279
|
-
public finalizeAudioUpload(
|
|
280
|
-
request: Ichos.FinalizeAudioUploadRequest,
|
|
281
|
-
requestOptions?: AudioClient.RequestOptions,
|
|
282
|
-
): core.HttpResponsePromise<Ichos.AudioResponse> {
|
|
283
|
-
return core.HttpResponsePromise.fromPromise(this.__finalizeAudioUpload(request, requestOptions));
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
private async __finalizeAudioUpload(
|
|
287
|
-
request: Ichos.FinalizeAudioUploadRequest,
|
|
288
|
-
requestOptions?: AudioClient.RequestOptions,
|
|
289
|
-
): Promise<core.WithRawResponse<Ichos.AudioResponse>> {
|
|
290
|
-
const { audioId, body: _body } = request;
|
|
291
|
-
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
292
|
-
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
293
|
-
_authRequest.headers,
|
|
294
|
-
this._options?.headers,
|
|
295
|
-
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
296
|
-
requestOptions?.headers,
|
|
297
|
-
);
|
|
298
|
-
const _response = await core.fetcher({
|
|
299
|
-
url: core.url.join(
|
|
300
|
-
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
301
|
-
(await core.Supplier.get(this._options.environment)) ??
|
|
302
|
-
environments.IchosEnvironment.Default,
|
|
303
|
-
`v1/audio/${core.url.encodePathParam(audioId)}`,
|
|
304
|
-
),
|
|
305
|
-
method: "POST",
|
|
306
|
-
headers: _headers,
|
|
307
|
-
contentType: "application/json",
|
|
308
|
-
queryParameters: requestOptions?.queryParams,
|
|
309
|
-
requestType: "json",
|
|
310
|
-
body: _body != null ? _body : undefined,
|
|
311
|
-
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
312
|
-
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
313
|
-
abortSignal: requestOptions?.abortSignal,
|
|
314
|
-
fetchFn: this._options?.fetch,
|
|
315
|
-
logging: this._options.logging,
|
|
316
|
-
});
|
|
317
|
-
if (_response.ok) {
|
|
318
|
-
return { data: _response.body as Ichos.AudioResponse, rawResponse: _response.rawResponse };
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
if (_response.error.reason === "status-code") {
|
|
322
|
-
switch (_response.error.statusCode) {
|
|
323
|
-
case 401:
|
|
324
|
-
throw new Ichos.UnauthorizedError(
|
|
325
|
-
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
272
|
+
case 429:
|
|
273
|
+
throw new Ichos.TooManyRequestsError(
|
|
274
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
326
275
|
_response.rawResponse,
|
|
327
276
|
);
|
|
328
277
|
case 500:
|
|
@@ -339,7 +288,7 @@ export class AudioClient {
|
|
|
339
288
|
}
|
|
340
289
|
}
|
|
341
290
|
|
|
342
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "
|
|
291
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/audio/{audioId}");
|
|
343
292
|
}
|
|
344
293
|
|
|
345
294
|
/**
|
|
@@ -350,6 +299,7 @@ export class AudioClient {
|
|
|
350
299
|
*
|
|
351
300
|
* @throws {@link Ichos.UnauthorizedError}
|
|
352
301
|
* @throws {@link Ichos.NotFoundError}
|
|
302
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
353
303
|
* @throws {@link Ichos.InternalServerError}
|
|
354
304
|
*
|
|
355
305
|
* @example
|
|
@@ -408,87 +358,9 @@ export class AudioClient {
|
|
|
408
358
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
409
359
|
_response.rawResponse,
|
|
410
360
|
);
|
|
411
|
-
case
|
|
412
|
-
throw new Ichos.
|
|
413
|
-
_response.error.body as Ichos.
|
|
414
|
-
_response.rawResponse,
|
|
415
|
-
);
|
|
416
|
-
default:
|
|
417
|
-
throw new errors.IchosError({
|
|
418
|
-
statusCode: _response.error.statusCode,
|
|
419
|
-
body: _response.error.body,
|
|
420
|
-
rawResponse: _response.rawResponse,
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/audio/{audioId}");
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Get the status of an ongoing audio pull operation.
|
|
430
|
-
*
|
|
431
|
-
* @param {Ichos.GetAudioPullStatusRequest} request
|
|
432
|
-
* @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
433
|
-
*
|
|
434
|
-
* @throws {@link Ichos.UnauthorizedError}
|
|
435
|
-
* @throws {@link Ichos.NotFoundError}
|
|
436
|
-
* @throws {@link Ichos.InternalServerError}
|
|
437
|
-
*
|
|
438
|
-
* @example
|
|
439
|
-
* await client.audio.getAudioPullStatus({
|
|
440
|
-
* audioId: "audioId"
|
|
441
|
-
* })
|
|
442
|
-
*/
|
|
443
|
-
public getAudioPullStatus(
|
|
444
|
-
request: Ichos.GetAudioPullStatusRequest,
|
|
445
|
-
requestOptions?: AudioClient.RequestOptions,
|
|
446
|
-
): core.HttpResponsePromise<Ichos.AudioPullStatusResponse> {
|
|
447
|
-
return core.HttpResponsePromise.fromPromise(this.__getAudioPullStatus(request, requestOptions));
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
private async __getAudioPullStatus(
|
|
451
|
-
request: Ichos.GetAudioPullStatusRequest,
|
|
452
|
-
requestOptions?: AudioClient.RequestOptions,
|
|
453
|
-
): Promise<core.WithRawResponse<Ichos.AudioPullStatusResponse>> {
|
|
454
|
-
const { audioId } = request;
|
|
455
|
-
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
456
|
-
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
457
|
-
_authRequest.headers,
|
|
458
|
-
this._options?.headers,
|
|
459
|
-
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
460
|
-
requestOptions?.headers,
|
|
461
|
-
);
|
|
462
|
-
const _response = await core.fetcher({
|
|
463
|
-
url: core.url.join(
|
|
464
|
-
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
465
|
-
(await core.Supplier.get(this._options.environment)) ??
|
|
466
|
-
environments.IchosEnvironment.Default,
|
|
467
|
-
`v1/audio/${core.url.encodePathParam(audioId)}/pull`,
|
|
468
|
-
),
|
|
469
|
-
method: "GET",
|
|
470
|
-
headers: _headers,
|
|
471
|
-
queryParameters: requestOptions?.queryParams,
|
|
472
|
-
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
473
|
-
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
474
|
-
abortSignal: requestOptions?.abortSignal,
|
|
475
|
-
fetchFn: this._options?.fetch,
|
|
476
|
-
logging: this._options.logging,
|
|
477
|
-
});
|
|
478
|
-
if (_response.ok) {
|
|
479
|
-
return { data: _response.body as Ichos.AudioPullStatusResponse, rawResponse: _response.rawResponse };
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
if (_response.error.reason === "status-code") {
|
|
483
|
-
switch (_response.error.statusCode) {
|
|
484
|
-
case 401:
|
|
485
|
-
throw new Ichos.UnauthorizedError(
|
|
486
|
-
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
487
|
-
_response.rawResponse,
|
|
488
|
-
);
|
|
489
|
-
case 404:
|
|
490
|
-
throw new Ichos.NotFoundError(
|
|
491
|
-
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
361
|
+
case 429:
|
|
362
|
+
throw new Ichos.TooManyRequestsError(
|
|
363
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
492
364
|
_response.rawResponse,
|
|
493
365
|
);
|
|
494
366
|
case 500:
|
|
@@ -505,7 +377,7 @@ export class AudioClient {
|
|
|
505
377
|
}
|
|
506
378
|
}
|
|
507
379
|
|
|
508
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "
|
|
380
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/audio/{audioId}");
|
|
509
381
|
}
|
|
510
382
|
|
|
511
383
|
/**
|
|
@@ -513,6 +385,7 @@ export class AudioClient {
|
|
|
513
385
|
* @param {AudioClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
514
386
|
*
|
|
515
387
|
* @throws {@link Ichos.UnauthorizedError}
|
|
388
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
516
389
|
* @throws {@link Ichos.InternalServerError}
|
|
517
390
|
*
|
|
518
391
|
* @example
|
|
@@ -568,6 +441,11 @@ export class AudioClient {
|
|
|
568
441
|
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
569
442
|
_response.rawResponse,
|
|
570
443
|
);
|
|
444
|
+
case 429:
|
|
445
|
+
throw new Ichos.TooManyRequestsError(
|
|
446
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
447
|
+
_response.rawResponse,
|
|
448
|
+
);
|
|
571
449
|
case 500:
|
|
572
450
|
throw new Ichos.InternalServerError(
|
|
573
451
|
_response.error.body as Ichos.InternalServerErrorResponse,
|