@ichos/sdk 1.0.1
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/README.md +5 -0
- package/dist/BaseClient.d.ts +43 -0
- package/dist/BaseClient.js +29 -0
- package/dist/Client.d.ts +38 -0
- package/dist/Client.js +53 -0
- package/dist/api/errors/ForbiddenError.d.ts +6 -0
- package/dist/api/errors/ForbiddenError.js +17 -0
- package/dist/api/errors/InternalServerError.d.ts +6 -0
- package/dist/api/errors/InternalServerError.js +17 -0
- package/dist/api/errors/NotFoundError.d.ts +6 -0
- package/dist/api/errors/NotFoundError.js +17 -0
- package/dist/api/errors/UnauthorizedError.d.ts +6 -0
- package/dist/api/errors/UnauthorizedError.js +17 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +6 -0
- package/dist/api/errors/UnprocessableEntityError.js +17 -0
- package/dist/api/errors/index.d.ts +5 -0
- package/dist/api/errors/index.js +5 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/resources/ads/client/Client.d.ts +226 -0
- package/dist/api/resources/ads/client/Client.js +732 -0
- package/dist/api/resources/ads/client/index.d.ts +1 -0
- package/dist/api/resources/ads/client/index.js +1 -0
- package/dist/api/resources/ads/client/requests/AdCreate.d.ts +24 -0
- package/dist/api/resources/ads/client/requests/AdCreate.js +8 -0
- package/dist/api/resources/ads/client/requests/AdInsertionPointCreate.d.ts +11 -0
- package/dist/api/resources/ads/client/requests/AdInsertionPointCreate.js +2 -0
- package/dist/api/resources/ads/client/requests/AdUpdate.d.ts +23 -0
- package/dist/api/resources/ads/client/requests/AdUpdate.js +8 -0
- package/dist/api/resources/ads/client/requests/DeleteAdRequest.d.ts +12 -0
- package/dist/api/resources/ads/client/requests/DeleteAdRequest.js +2 -0
- package/dist/api/resources/ads/client/requests/LinkAdAudioRequest.d.ts +13 -0
- package/dist/api/resources/ads/client/requests/LinkAdAudioRequest.js +2 -0
- package/dist/api/resources/ads/client/requests/ListAdInsertionPointsRequest.d.ts +10 -0
- package/dist/api/resources/ads/client/requests/ListAdInsertionPointsRequest.js +2 -0
- package/dist/api/resources/ads/client/requests/ListVirtualUserAdsRequest.d.ts +8 -0
- package/dist/api/resources/ads/client/requests/ListVirtualUserAdsRequest.js +2 -0
- package/dist/api/resources/ads/client/requests/UpdateAdWeightRequest.d.ts +9 -0
- package/dist/api/resources/ads/client/requests/UpdateAdWeightRequest.js +2 -0
- package/dist/api/resources/ads/client/requests/index.d.ts +8 -0
- package/dist/api/resources/ads/client/requests/index.js +1 -0
- package/dist/api/resources/ads/index.d.ts +1 -0
- package/dist/api/resources/ads/index.js +1 -0
- package/dist/api/resources/analytics/client/Client.d.ts +28 -0
- package/dist/api/resources/analytics/client/Client.js +68 -0
- package/dist/api/resources/analytics/client/index.d.ts +1 -0
- package/dist/api/resources/analytics/client/index.js +1 -0
- package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.d.ts +9 -0
- package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.js +2 -0
- package/dist/api/resources/analytics/client/requests/index.d.ts +1 -0
- package/dist/api/resources/analytics/client/requests/index.js +1 -0
- package/dist/api/resources/analytics/index.d.ts +1 -0
- package/dist/api/resources/analytics/index.js +1 -0
- package/dist/api/resources/audio/client/Client.d.ts +130 -0
- package/dist/api/resources/audio/client/Client.js +402 -0
- package/dist/api/resources/audio/client/index.d.ts +1 -0
- package/dist/api/resources/audio/client/index.js +1 -0
- package/dist/api/resources/audio/client/requests/DeleteAudioRequest.d.ts +10 -0
- package/dist/api/resources/audio/client/requests/DeleteAudioRequest.js +2 -0
- package/dist/api/resources/audio/client/requests/FinalizeAudioUploadRequest.d.ts +16 -0
- package/dist/api/resources/audio/client/requests/FinalizeAudioUploadRequest.js +2 -0
- package/dist/api/resources/audio/client/requests/GetAudioPullStatusRequest.d.ts +10 -0
- package/dist/api/resources/audio/client/requests/GetAudioPullStatusRequest.js +2 -0
- package/dist/api/resources/audio/client/requests/GetAudioRequest.d.ts +10 -0
- package/dist/api/resources/audio/client/requests/GetAudioRequest.js +2 -0
- package/dist/api/resources/audio/client/requests/PullAudioDto.d.ts +9 -0
- package/dist/api/resources/audio/client/requests/PullAudioDto.js +2 -0
- package/dist/api/resources/audio/client/requests/TextToSpeechRequest.d.ts +10 -0
- package/dist/api/resources/audio/client/requests/TextToSpeechRequest.js +2 -0
- package/dist/api/resources/audio/client/requests/index.d.ts +6 -0
- package/dist/api/resources/audio/client/requests/index.js +1 -0
- package/dist/api/resources/audio/index.d.ts +1 -0
- package/dist/api/resources/audio/index.js +1 -0
- package/dist/api/resources/episodes/client/Client.d.ts +234 -0
- package/dist/api/resources/episodes/client/Client.js +746 -0
- package/dist/api/resources/episodes/client/index.d.ts +1 -0
- package/dist/api/resources/episodes/client/index.js +1 -0
- package/dist/api/resources/episodes/client/requests/DeleteEpisodeRequest.d.ts +12 -0
- package/dist/api/resources/episodes/client/requests/DeleteEpisodeRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts +45 -0
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.js +15 -0
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts +45 -0
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js +15 -0
- package/dist/api/resources/episodes/client/requests/GenerateEpisodeCoverUploadUrlRequest.d.ts +10 -0
- package/dist/api/resources/episodes/client/requests/GenerateEpisodeCoverUploadUrlRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeAudioRequest.d.ts +10 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeAudioRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.d.ts +10 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeListenersReportRequest.d.ts +10 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeListenersReportRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeRequest.d.ts +10 -0
- package/dist/api/resources/episodes/client/requests/GetEpisodeRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/LinkEpisodeAudioRequest.d.ts +13 -0
- package/dist/api/resources/episodes/client/requests/LinkEpisodeAudioRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/ListPodcastEpisodesRequest.d.ts +10 -0
- package/dist/api/resources/episodes/client/requests/ListPodcastEpisodesRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/PublishEpisodeRequest.d.ts +10 -0
- package/dist/api/resources/episodes/client/requests/PublishEpisodeRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/PullEpisodeCoverFromUrlRequest.d.ts +12 -0
- package/dist/api/resources/episodes/client/requests/PullEpisodeCoverFromUrlRequest.js +2 -0
- package/dist/api/resources/episodes/client/requests/index.d.ts +12 -0
- package/dist/api/resources/episodes/client/requests/index.js +1 -0
- package/dist/api/resources/episodes/index.d.ts +1 -0
- package/dist/api/resources/episodes/index.js +1 -0
- package/dist/api/resources/index.d.ts +17 -0
- package/dist/api/resources/index.js +17 -0
- package/dist/api/resources/organizations/client/Client.d.ts +40 -0
- package/dist/api/resources/organizations/client/Client.js +122 -0
- package/dist/api/resources/organizations/client/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/index.js +1 -0
- package/dist/api/resources/organizations/index.d.ts +1 -0
- package/dist/api/resources/organizations/index.js +1 -0
- package/dist/api/resources/podcasts/client/Client.d.ts +246 -0
- package/dist/api/resources/podcasts/client/Client.js +787 -0
- package/dist/api/resources/podcasts/client/index.d.ts +1 -0
- package/dist/api/resources/podcasts/client/index.js +1 -0
- package/dist/api/resources/podcasts/client/requests/DeletePodcastRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/DeletePodcastRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/GeneratePodcastCoverUploadUrlRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/GeneratePodcastCoverUploadUrlRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastListenersReportRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastListenersReportRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastRssRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/GetPodcastRssRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/ImportPodcastFromRssRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/ImportPodcastFromRssRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts +59 -0
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.js +9 -0
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts +60 -0
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.js +9 -0
- package/dist/api/resources/podcasts/client/requests/PublishPodcastRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/PublishPodcastRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/PullPodcastCoverFromUrlRequest.d.ts +12 -0
- package/dist/api/resources/podcasts/client/requests/PullPodcastCoverFromUrlRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/ValidatePodcastRequest.d.ts +10 -0
- package/dist/api/resources/podcasts/client/requests/ValidatePodcastRequest.js +2 -0
- package/dist/api/resources/podcasts/client/requests/index.d.ts +12 -0
- package/dist/api/resources/podcasts/client/requests/index.js +1 -0
- package/dist/api/resources/podcasts/index.d.ts +1 -0
- package/dist/api/resources/podcasts/index.js +1 -0
- package/dist/api/resources/segments/client/Client.d.ts +120 -0
- package/dist/api/resources/segments/client/Client.js +374 -0
- package/dist/api/resources/segments/client/index.d.ts +1 -0
- package/dist/api/resources/segments/client/index.js +1 -0
- package/dist/api/resources/segments/client/requests/DeleteSegmentRequest.d.ts +12 -0
- package/dist/api/resources/segments/client/requests/DeleteSegmentRequest.js +2 -0
- package/dist/api/resources/segments/client/requests/LinkSegmentAudioRequest.d.ts +13 -0
- package/dist/api/resources/segments/client/requests/LinkSegmentAudioRequest.js +2 -0
- package/dist/api/resources/segments/client/requests/ListPodcastSegmentsRequest.d.ts +10 -0
- package/dist/api/resources/segments/client/requests/ListPodcastSegmentsRequest.js +2 -0
- package/dist/api/resources/segments/client/requests/SegmentCreate.d.ts +29 -0
- package/dist/api/resources/segments/client/requests/SegmentCreate.js +13 -0
- package/dist/api/resources/segments/client/requests/SegmentUpdate.d.ts +29 -0
- package/dist/api/resources/segments/client/requests/SegmentUpdate.js +13 -0
- package/dist/api/resources/segments/client/requests/index.d.ts +5 -0
- package/dist/api/resources/segments/client/requests/index.js +1 -0
- package/dist/api/resources/segments/index.d.ts +1 -0
- package/dist/api/resources/segments/index.js +1 -0
- package/dist/api/resources/users/client/Client.d.ts +89 -0
- package/dist/api/resources/users/client/Client.js +293 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +1 -0
- package/dist/api/resources/users/client/requests/UpdateCurrentVirtualUserRequest.d.ts +7 -0
- package/dist/api/resources/users/client/requests/UpdateCurrentVirtualUserRequest.js +2 -0
- package/dist/api/resources/users/client/requests/index.d.ts +1 -0
- package/dist/api/resources/users/client/requests/index.js +1 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +1 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +76 -0
- package/dist/api/resources/webhooks/client/Client.js +236 -0
- package/dist/api/resources/webhooks/client/index.d.ts +1 -0
- package/dist/api/resources/webhooks/client/index.js +1 -0
- package/dist/api/resources/webhooks/client/requests/CreateWebhookDestinationRequest.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/CreateWebhookDestinationRequest.js +2 -0
- package/dist/api/resources/webhooks/client/requests/DeleteWebhookDestinationRequest.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/DeleteWebhookDestinationRequest.js +2 -0
- package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -0
- package/dist/api/resources/webhooks/client/requests/index.js +1 -0
- package/dist/api/resources/webhooks/index.d.ts +1 -0
- package/dist/api/resources/webhooks/index.js +1 -0
- package/dist/api/types/Ad.d.ts +16 -0
- package/dist/api/types/Ad.js +8 -0
- package/dist/api/types/AdId.d.ts +9 -0
- package/dist/api/types/AdId.js +7 -0
- package/dist/api/types/AdInsertionPoint.d.ts +5 -0
- package/dist/api/types/AdInsertionPoint.js +2 -0
- package/dist/api/types/AdInsertionPointListResponse.d.ts +6 -0
- package/dist/api/types/AdInsertionPointListResponse.js +2 -0
- package/dist/api/types/AdInsertionPointResponse.d.ts +6 -0
- package/dist/api/types/AdInsertionPointResponse.js +2 -0
- package/dist/api/types/AdListResponse.d.ts +6 -0
- package/dist/api/types/AdListResponse.js +2 -0
- package/dist/api/types/AdResponse.d.ts +6 -0
- package/dist/api/types/AdResponse.js +2 -0
- package/dist/api/types/AdWeight.d.ts +5 -0
- package/dist/api/types/AdWeight.js +2 -0
- package/dist/api/types/AdWeightListResponse.d.ts +6 -0
- package/dist/api/types/AdWeightListResponse.js +2 -0
- package/dist/api/types/ApiMeta.d.ts +3 -0
- package/dist/api/types/ApiMeta.js +2 -0
- package/dist/api/types/ApiMetaSuccess.d.ts +5 -0
- package/dist/api/types/ApiMetaSuccess.js +2 -0
- package/dist/api/types/ApplePodcastCategory.d.ts +113 -0
- package/dist/api/types/ApplePodcastCategory.js +113 -0
- package/dist/api/types/Audio.d.ts +27 -0
- package/dist/api/types/Audio.js +12 -0
- package/dist/api/types/AudioEntityLink.d.ts +16 -0
- package/dist/api/types/AudioEntityLink.js +2 -0
- package/dist/api/types/AudioProcessedPayload.d.ts +3 -0
- package/dist/api/types/AudioProcessedPayload.js +2 -0
- package/dist/api/types/AudioPullResponse.d.ts +12 -0
- package/dist/api/types/AudioPullResponse.js +2 -0
- package/dist/api/types/AudioPullStatusResponse.d.ts +22 -0
- package/dist/api/types/AudioPullStatusResponse.js +15 -0
- package/dist/api/types/AudioPulledPayload.d.ts +3 -0
- package/dist/api/types/AudioPulledPayload.js +2 -0
- package/dist/api/types/AudioResponse.d.ts +6 -0
- package/dist/api/types/AudioResponse.js +2 -0
- package/dist/api/types/AudioUploadOptions.d.ts +11 -0
- package/dist/api/types/AudioUploadOptions.js +2 -0
- package/dist/api/types/AudioUploadResponse.d.ts +24 -0
- package/dist/api/types/AudioUploadResponse.js +10 -0
- package/dist/api/types/AuthenticatedOrganizationResponse.d.ts +6 -0
- package/dist/api/types/AuthenticatedOrganizationResponse.js +2 -0
- package/dist/api/types/Chapter.d.ts +5 -0
- package/dist/api/types/Chapter.js +2 -0
- package/dist/api/types/CoverUploadOptions.d.ts +11 -0
- package/dist/api/types/CoverUploadOptions.js +2 -0
- package/dist/api/types/CoverUploadResponse.d.ts +23 -0
- package/dist/api/types/CoverUploadResponse.js +10 -0
- package/dist/api/types/Episode.d.ts +42 -0
- package/dist/api/types/Episode.js +15 -0
- package/dist/api/types/EpisodeCreateResponse.d.ts +6 -0
- package/dist/api/types/EpisodeCreateResponse.js +2 -0
- package/dist/api/types/EpisodeCreatedResponseData.d.ts +44 -0
- package/dist/api/types/EpisodeCreatedResponseData.js +15 -0
- package/dist/api/types/EpisodeId.d.ts +9 -0
- package/dist/api/types/EpisodeId.js +7 -0
- package/dist/api/types/EpisodeResponse.d.ts +6 -0
- package/dist/api/types/EpisodeResponse.js +2 -0
- package/dist/api/types/EpisodeTranscript.d.ts +6 -0
- package/dist/api/types/EpisodeTranscript.js +2 -0
- package/dist/api/types/EpisodesResponse.d.ts +6 -0
- package/dist/api/types/EpisodesResponse.js +2 -0
- package/dist/api/types/InternalServerErrorBody.d.ts +8 -0
- package/dist/api/types/InternalServerErrorBody.js +2 -0
- package/dist/api/types/InternalServerErrorResponse.d.ts +6 -0
- package/dist/api/types/InternalServerErrorResponse.js +2 -0
- package/dist/api/types/ListWebhookDestinationsResponse.d.ts +6 -0
- package/dist/api/types/ListWebhookDestinationsResponse.js +2 -0
- package/dist/api/types/ListWebhookEventsResponse.d.ts +6 -0
- package/dist/api/types/ListWebhookEventsResponse.js +2 -0
- package/dist/api/types/Listeners.d.ts +4 -0
- package/dist/api/types/Listeners.js +2 -0
- package/dist/api/types/ListenersReport.d.ts +5 -0
- package/dist/api/types/ListenersReport.js +2 -0
- package/dist/api/types/ListenersReportResponse.d.ts +6 -0
- package/dist/api/types/ListenersReportResponse.js +2 -0
- package/dist/api/types/MonthlyListenersResponse.d.ts +6 -0
- package/dist/api/types/MonthlyListenersResponse.js +2 -0
- package/dist/api/types/NotFoundErrorBody.d.ts +8 -0
- package/dist/api/types/NotFoundErrorBody.js +2 -0
- package/dist/api/types/NotFoundErrorResponse.d.ts +6 -0
- package/dist/api/types/NotFoundErrorResponse.js +2 -0
- package/dist/api/types/NullResponse.d.ts +6 -0
- package/dist/api/types/NullResponse.js +2 -0
- package/dist/api/types/Organization.d.ts +19 -0
- package/dist/api/types/Organization.js +12 -0
- package/dist/api/types/Person.d.ts +7 -0
- package/dist/api/types/Person.js +2 -0
- package/dist/api/types/Podcast.d.ts +65 -0
- package/dist/api/types/Podcast.js +15 -0
- package/dist/api/types/PodcastImportCompletedPayload.d.ts +3 -0
- package/dist/api/types/PodcastImportCompletedPayload.js +2 -0
- package/dist/api/types/PodcastImportFailedPayload.d.ts +5 -0
- package/dist/api/types/PodcastImportFailedPayload.js +2 -0
- package/dist/api/types/PodcastResponse.d.ts +6 -0
- package/dist/api/types/PodcastResponse.js +2 -0
- package/dist/api/types/PodcastsResponse.d.ts +6 -0
- package/dist/api/types/PodcastsResponse.js +2 -0
- package/dist/api/types/PublishPodcastOutput.d.ts +3 -0
- package/dist/api/types/PublishPodcastOutput.js +2 -0
- package/dist/api/types/RetrieveCoverResponse.d.ts +11 -0
- package/dist/api/types/RetrieveCoverResponse.js +2 -0
- package/dist/api/types/Segment.d.ts +25 -0
- package/dist/api/types/Segment.js +13 -0
- package/dist/api/types/SegmentId.d.ts +9 -0
- package/dist/api/types/SegmentId.js +7 -0
- package/dist/api/types/SegmentListResponse.d.ts +6 -0
- package/dist/api/types/SegmentListResponse.js +2 -0
- package/dist/api/types/SegmentResponse.d.ts +6 -0
- package/dist/api/types/SegmentResponse.js +2 -0
- package/dist/api/types/StringOrNullResponse.d.ts +6 -0
- package/dist/api/types/StringOrNullResponse.js +2 -0
- package/dist/api/types/StringResponse.d.ts +6 -0
- package/dist/api/types/StringResponse.js +2 -0
- package/dist/api/types/TranscriptCompletedPayload.d.ts +4 -0
- package/dist/api/types/TranscriptCompletedPayload.js +2 -0
- package/dist/api/types/UnauthenticatedError.d.ts +8 -0
- package/dist/api/types/UnauthenticatedError.js +2 -0
- package/dist/api/types/UnauthenticatedErrorResponse.d.ts +6 -0
- package/dist/api/types/UnauthenticatedErrorResponse.js +2 -0
- package/dist/api/types/UnauthorizedErrorBody.d.ts +8 -0
- package/dist/api/types/UnauthorizedErrorBody.js +2 -0
- package/dist/api/types/UnauthorizedErrorResponse.d.ts +6 -0
- package/dist/api/types/UnauthorizedErrorResponse.js +2 -0
- package/dist/api/types/UserUploadAudioResponse.d.ts +6 -0
- package/dist/api/types/UserUploadAudioResponse.js +2 -0
- package/dist/api/types/UserUploadAudioResult.d.ts +5 -0
- package/dist/api/types/UserUploadAudioResult.js +2 -0
- package/dist/api/types/UserUploadCoverResponse.d.ts +6 -0
- package/dist/api/types/UserUploadCoverResponse.js +2 -0
- package/dist/api/types/UserUploadCoverResult.d.ts +5 -0
- package/dist/api/types/UserUploadCoverResult.js +2 -0
- package/dist/api/types/UserUploadCoverResultResponse.d.ts +6 -0
- package/dist/api/types/UserUploadCoverResultResponse.js +2 -0
- package/dist/api/types/ValidationErrorResponse.d.ts +6 -0
- package/dist/api/types/ValidationErrorResponse.js +2 -0
- package/dist/api/types/ValidationIssue.d.ts +17 -0
- package/dist/api/types/ValidationIssue.js +11 -0
- package/dist/api/types/VirtualUser.d.ts +10 -0
- package/dist/api/types/VirtualUser.js +2 -0
- package/dist/api/types/VirtualUserListResponse.d.ts +6 -0
- package/dist/api/types/VirtualUserListResponse.js +2 -0
- package/dist/api/types/VirtualUserResponse.d.ts +6 -0
- package/dist/api/types/VirtualUserResponse.js +2 -0
- package/dist/api/types/WebhookDestination.d.ts +7 -0
- package/dist/api/types/WebhookDestination.js +2 -0
- package/dist/api/types/WebhookDestinationResponse.d.ts +6 -0
- package/dist/api/types/WebhookDestinationResponse.js +2 -0
- package/dist/api/types/WebhookEvent.d.ts +28 -0
- package/dist/api/types/WebhookEvent.js +16 -0
- package/dist/api/types/index.d.ts +76 -0
- package/dist/api/types/index.js +76 -0
- package/dist/auth/BearerAuthProvider.d.ts +16 -0
- package/dist/auth/BearerAuthProvider.js +23 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/core/auth/AuthProvider.d.ts +7 -0
- package/dist/core/auth/AuthProvider.js +1 -0
- package/dist/core/auth/AuthRequest.d.ts +9 -0
- package/dist/core/auth/AuthRequest.js +1 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +24 -0
- package/dist/core/auth/BearerToken.d.ts +7 -0
- package/dist/core/auth/BearerToken.js +13 -0
- package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/core/auth/NoOpAuthProvider.js +5 -0
- package/dist/core/auth/index.d.ts +5 -0
- package/dist/core/auth/index.js +3 -0
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/base64.js +22 -0
- package/dist/core/exports.d.ts +1 -0
- package/dist/core/exports.js +1 -0
- package/dist/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/core/fetcher/APIResponse.js +1 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/core/fetcher/BinaryResponse.js +14 -0
- package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/core/fetcher/EndpointMetadata.js +1 -0
- package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/core/fetcher/EndpointSupplier.js +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +49 -0
- package/dist/core/fetcher/Fetcher.js +295 -0
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +83 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +90 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +40 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +10 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +5 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +30 -0
- package/dist/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/core/fetcher/getFetchFn.js +3 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +8 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +13 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +55 -0
- package/dist/core/fetcher/index.d.ts +11 -0
- package/dist/core/fetcher/index.js +6 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +27 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +53 -0
- package/dist/core/fetcher/signals.d.ts +5 -0
- package/dist/core/fetcher/signals.js +20 -0
- package/dist/core/headers.d.ts +2 -0
- package/dist/core/headers.js +27 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +6 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +19 -0
- package/dist/core/logging/exports.d.ts +18 -0
- package/dist/core/logging/exports.js +9 -0
- package/dist/core/logging/index.d.ts +1 -0
- package/dist/core/logging/index.js +1 -0
- package/dist/core/logging/logger.d.ts +126 -0
- package/dist/core/logging/logger.js +140 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +1 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +99 -0
- package/dist/core/url/encodePathParam.d.ts +1 -0
- package/dist/core/url/encodePathParam.js +18 -0
- package/dist/core/url/index.d.ts +3 -0
- package/dist/core/url/index.js +3 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +65 -0
- package/dist/core/url/qs.d.ts +6 -0
- package/dist/core/url/qs.js +64 -0
- package/dist/environments.d.ts +4 -0
- package/dist/environments.js +4 -0
- package/dist/errors/IchosError.d.ts +12 -0
- package/dist/errors/IchosError.js +31 -0
- package/dist/errors/IchosTimeoutError.d.ts +3 -0
- package/dist/errors/IchosTimeoutError.js +11 -0
- package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/errors/handleNonStatusCodeError.js +29 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +2 -0
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/package.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BearerAuthProvider } from "./auth/BearerAuthProvider.js";
|
|
2
|
+
import * as core from "./core/index.js";
|
|
3
|
+
import type * as environments from "./environments.js";
|
|
4
|
+
export type BaseClientOptions = {
|
|
5
|
+
environment?: core.Supplier<environments.IchosEnvironment | string>;
|
|
6
|
+
/** Specify a custom URL to connect the client to. */
|
|
7
|
+
baseUrl?: core.Supplier<string>;
|
|
8
|
+
/** Override the x-virtual-user header */
|
|
9
|
+
virtualUser?: core.Supplier<string | undefined>;
|
|
10
|
+
/** Additional headers to include in requests. */
|
|
11
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
|
+
/** The default maximum time to wait for a response in seconds. */
|
|
13
|
+
timeoutInSeconds?: number;
|
|
14
|
+
/** The default number of times to retry the request. Defaults to 2. */
|
|
15
|
+
maxRetries?: number;
|
|
16
|
+
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
17
|
+
fetch?: typeof fetch;
|
|
18
|
+
/** Configure logging for the client. */
|
|
19
|
+
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
20
|
+
} & BearerAuthProvider.AuthOptions;
|
|
21
|
+
export interface BaseRequestOptions {
|
|
22
|
+
/** The maximum time to wait for a response in seconds. */
|
|
23
|
+
timeoutInSeconds?: number;
|
|
24
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
25
|
+
maxRetries?: number;
|
|
26
|
+
/** A hook to abort the request. */
|
|
27
|
+
abortSignal?: AbortSignal;
|
|
28
|
+
/** Override the x-virtual-user header */
|
|
29
|
+
virtualUser?: string | undefined;
|
|
30
|
+
/** Additional query string parameters to include in the request. */
|
|
31
|
+
queryParams?: Record<string, unknown>;
|
|
32
|
+
/** Additional headers to include in the request. */
|
|
33
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
34
|
+
}
|
|
35
|
+
export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
|
|
36
|
+
logging: core.logging.Logger;
|
|
37
|
+
authProvider?: core.AuthProvider;
|
|
38
|
+
};
|
|
39
|
+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
40
|
+
authProvider: core.AuthProvider;
|
|
41
|
+
};
|
|
42
|
+
export declare function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
43
|
+
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import { BearerAuthProvider } from "./auth/BearerAuthProvider.js";
|
|
3
|
+
import { mergeHeaders } from "./core/headers.js";
|
|
4
|
+
import * as core from "./core/index.js";
|
|
5
|
+
export function normalizeClientOptions(options) {
|
|
6
|
+
const headers = mergeHeaders({
|
|
7
|
+
"X-Fern-Language": "JavaScript",
|
|
8
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
9
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
10
|
+
"x-virtual-user": options?.virtualUser,
|
|
11
|
+
}, options?.headers);
|
|
12
|
+
return {
|
|
13
|
+
...options,
|
|
14
|
+
logging: core.logging.createLogger(options?.logging),
|
|
15
|
+
headers,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export function normalizeClientOptionsWithAuth(options) {
|
|
19
|
+
const normalized = normalizeClientOptions(options);
|
|
20
|
+
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
|
|
21
|
+
normalized.authProvider ??= new BearerAuthProvider(normalizedWithNoOpAuthProvider);
|
|
22
|
+
return normalized;
|
|
23
|
+
}
|
|
24
|
+
function withNoOpAuthProvider(options) {
|
|
25
|
+
return {
|
|
26
|
+
...options,
|
|
27
|
+
authProvider: new core.NoOpAuthProvider(),
|
|
28
|
+
};
|
|
29
|
+
}
|
package/dist/Client.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AdsClient } from "./api/resources/ads/client/Client.js";
|
|
2
|
+
import { AnalyticsClient } from "./api/resources/analytics/client/Client.js";
|
|
3
|
+
import { AudioClient } from "./api/resources/audio/client/Client.js";
|
|
4
|
+
import { EpisodesClient } from "./api/resources/episodes/client/Client.js";
|
|
5
|
+
import { OrganizationsClient } from "./api/resources/organizations/client/Client.js";
|
|
6
|
+
import { PodcastsClient } from "./api/resources/podcasts/client/Client.js";
|
|
7
|
+
import { SegmentsClient } from "./api/resources/segments/client/Client.js";
|
|
8
|
+
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
9
|
+
import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
|
|
10
|
+
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
11
|
+
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
12
|
+
export declare namespace IchosClient {
|
|
13
|
+
type Options = BaseClientOptions;
|
|
14
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare class IchosClient {
|
|
18
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<IchosClient.Options>;
|
|
19
|
+
protected _webhooks: WebhooksClient | undefined;
|
|
20
|
+
protected _segments: SegmentsClient | undefined;
|
|
21
|
+
protected _podcasts: PodcastsClient | undefined;
|
|
22
|
+
protected _episodes: EpisodesClient | undefined;
|
|
23
|
+
protected _users: UsersClient | undefined;
|
|
24
|
+
protected _organizations: OrganizationsClient | undefined;
|
|
25
|
+
protected _audio: AudioClient | undefined;
|
|
26
|
+
protected _analytics: AnalyticsClient | undefined;
|
|
27
|
+
protected _ads: AdsClient | undefined;
|
|
28
|
+
constructor(options: IchosClient.Options);
|
|
29
|
+
get webhooks(): WebhooksClient;
|
|
30
|
+
get segments(): SegmentsClient;
|
|
31
|
+
get podcasts(): PodcastsClient;
|
|
32
|
+
get episodes(): EpisodesClient;
|
|
33
|
+
get users(): UsersClient;
|
|
34
|
+
get organizations(): OrganizationsClient;
|
|
35
|
+
get audio(): AudioClient;
|
|
36
|
+
get analytics(): AnalyticsClient;
|
|
37
|
+
get ads(): AdsClient;
|
|
38
|
+
}
|
package/dist/Client.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import { AdsClient } from "./api/resources/ads/client/Client.js";
|
|
3
|
+
import { AnalyticsClient } from "./api/resources/analytics/client/Client.js";
|
|
4
|
+
import { AudioClient } from "./api/resources/audio/client/Client.js";
|
|
5
|
+
import { EpisodesClient } from "./api/resources/episodes/client/Client.js";
|
|
6
|
+
import { OrganizationsClient } from "./api/resources/organizations/client/Client.js";
|
|
7
|
+
import { PodcastsClient } from "./api/resources/podcasts/client/Client.js";
|
|
8
|
+
import { SegmentsClient } from "./api/resources/segments/client/Client.js";
|
|
9
|
+
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
10
|
+
import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "./BaseClient.js";
|
|
12
|
+
export class IchosClient {
|
|
13
|
+
_options;
|
|
14
|
+
_webhooks;
|
|
15
|
+
_segments;
|
|
16
|
+
_podcasts;
|
|
17
|
+
_episodes;
|
|
18
|
+
_users;
|
|
19
|
+
_organizations;
|
|
20
|
+
_audio;
|
|
21
|
+
_analytics;
|
|
22
|
+
_ads;
|
|
23
|
+
constructor(options) {
|
|
24
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
25
|
+
}
|
|
26
|
+
get webhooks() {
|
|
27
|
+
return (this._webhooks ??= new WebhooksClient(this._options));
|
|
28
|
+
}
|
|
29
|
+
get segments() {
|
|
30
|
+
return (this._segments ??= new SegmentsClient(this._options));
|
|
31
|
+
}
|
|
32
|
+
get podcasts() {
|
|
33
|
+
return (this._podcasts ??= new PodcastsClient(this._options));
|
|
34
|
+
}
|
|
35
|
+
get episodes() {
|
|
36
|
+
return (this._episodes ??= new EpisodesClient(this._options));
|
|
37
|
+
}
|
|
38
|
+
get users() {
|
|
39
|
+
return (this._users ??= new UsersClient(this._options));
|
|
40
|
+
}
|
|
41
|
+
get organizations() {
|
|
42
|
+
return (this._organizations ??= new OrganizationsClient(this._options));
|
|
43
|
+
}
|
|
44
|
+
get audio() {
|
|
45
|
+
return (this._audio ??= new AudioClient(this._options));
|
|
46
|
+
}
|
|
47
|
+
get analytics() {
|
|
48
|
+
return (this._analytics ??= new AnalyticsClient(this._options));
|
|
49
|
+
}
|
|
50
|
+
get ads() {
|
|
51
|
+
return (this._ads ??= new AdsClient(this._options));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Ichos from "../index.js";
|
|
4
|
+
export declare class ForbiddenError extends errors.IchosError {
|
|
5
|
+
constructor(body: Ichos.UnauthenticatedErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
export class ForbiddenError extends errors.IchosError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "ForbiddenError",
|
|
7
|
+
statusCode: 403,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Ichos from "../index.js";
|
|
4
|
+
export declare class InternalServerError extends errors.IchosError {
|
|
5
|
+
constructor(body: Ichos.InternalServerErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
export class InternalServerError extends errors.IchosError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "InternalServerError",
|
|
7
|
+
statusCode: 500,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Ichos from "../index.js";
|
|
4
|
+
export declare class NotFoundError extends errors.IchosError {
|
|
5
|
+
constructor(body: Ichos.NotFoundErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
export class NotFoundError extends errors.IchosError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "NotFoundError",
|
|
7
|
+
statusCode: 404,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Ichos from "../index.js";
|
|
4
|
+
export declare class UnauthorizedError extends errors.IchosError {
|
|
5
|
+
constructor(body: Ichos.UnauthorizedErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
export class UnauthorizedError extends errors.IchosError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "UnauthorizedError",
|
|
7
|
+
statusCode: 401,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Ichos from "../index.js";
|
|
4
|
+
export declare class UnprocessableEntityError extends errors.IchosError {
|
|
5
|
+
constructor(body: Ichos.ValidationErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
export class UnprocessableEntityError extends errors.IchosError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "UnprocessableEntityError",
|
|
7
|
+
statusCode: 422,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as Ichos from "../../../index.js";
|
|
5
|
+
export declare namespace AdsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class AdsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AdsClient.Options>;
|
|
12
|
+
constructor(options: AdsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Create a new ad. Ads are associated with either an organization or a virtual user.
|
|
15
|
+
* An organization ad must have an organizationId and no virtualUserId.
|
|
16
|
+
* A virtual user ad must have both an organizationId and a virtualUserId.
|
|
17
|
+
* Audio for the ad will need to be uploaded separately and linked via the /link-audio endpoint.
|
|
18
|
+
*
|
|
19
|
+
* @param {Ichos.AdCreate} request
|
|
20
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
|
+
*
|
|
22
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
23
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
24
|
+
* @throws {@link Ichos.InternalServerError}
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* await client.ads.createAd({
|
|
28
|
+
* active: true,
|
|
29
|
+
* label: "label",
|
|
30
|
+
* type: "organization",
|
|
31
|
+
* organizationId: "organizationId"
|
|
32
|
+
* })
|
|
33
|
+
*/
|
|
34
|
+
createAd(request: Ichos.AdCreate, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdResponse>;
|
|
35
|
+
private __createAd;
|
|
36
|
+
/**
|
|
37
|
+
* Delete an ad.
|
|
38
|
+
* Optionally delete the associated audio file.
|
|
39
|
+
*
|
|
40
|
+
* @param {Ichos.DeleteAdRequest} request
|
|
41
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
|
+
*
|
|
43
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
44
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
45
|
+
* @throws {@link Ichos.NotFoundError}
|
|
46
|
+
* @throws {@link Ichos.InternalServerError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.ads.deleteAd({
|
|
50
|
+
* adId: "adId"
|
|
51
|
+
* })
|
|
52
|
+
*/
|
|
53
|
+
deleteAd(request: Ichos.DeleteAdRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.NullResponse>;
|
|
54
|
+
private __deleteAd;
|
|
55
|
+
/**
|
|
56
|
+
* Update an existing ad
|
|
57
|
+
*
|
|
58
|
+
* @param {Ichos.AdUpdate} request
|
|
59
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
62
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
63
|
+
* @throws {@link Ichos.InternalServerError}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* await client.ads.updateAd({
|
|
67
|
+
* adId: "adId"
|
|
68
|
+
* })
|
|
69
|
+
*/
|
|
70
|
+
updateAd(request: Ichos.AdUpdate, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdResponse>;
|
|
71
|
+
private __updateAd;
|
|
72
|
+
/**
|
|
73
|
+
* Link an audio file to an ad.
|
|
74
|
+
* This associates an uploaded audio file with the ad definition.
|
|
75
|
+
*
|
|
76
|
+
* @param {Ichos.LinkAdAudioRequest} request
|
|
77
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
80
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
81
|
+
* @throws {@link Ichos.InternalServerError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await client.ads.linkAdAudio({
|
|
85
|
+
* adId: "adId",
|
|
86
|
+
* audioId: "audioId"
|
|
87
|
+
* })
|
|
88
|
+
*/
|
|
89
|
+
linkAdAudio(request: Ichos.LinkAdAudioRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.NullResponse>;
|
|
90
|
+
private __linkAdAudio;
|
|
91
|
+
/**
|
|
92
|
+
* Retrieve all ads for the authenticated organization
|
|
93
|
+
*
|
|
94
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
97
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
98
|
+
* @throws {@link Ichos.NotFoundError}
|
|
99
|
+
* @throws {@link Ichos.InternalServerError}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.ads.listOrganizationAds()
|
|
103
|
+
*/
|
|
104
|
+
listOrganizationAds(requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdListResponse>;
|
|
105
|
+
private __listOrganizationAds;
|
|
106
|
+
/**
|
|
107
|
+
* Retrieve all ads for a specific virtual user
|
|
108
|
+
*
|
|
109
|
+
* @param {Ichos.ListVirtualUserAdsRequest} request
|
|
110
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
111
|
+
*
|
|
112
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
113
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
114
|
+
* @throws {@link Ichos.NotFoundError}
|
|
115
|
+
* @throws {@link Ichos.InternalServerError}
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* await client.ads.listVirtualUserAds()
|
|
119
|
+
*/
|
|
120
|
+
listVirtualUserAds(request?: Ichos.ListVirtualUserAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdListResponse>;
|
|
121
|
+
private __listVirtualUserAds;
|
|
122
|
+
/**
|
|
123
|
+
* Retrieve ad weights for the authenticated virtual user
|
|
124
|
+
*
|
|
125
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
|
+
*
|
|
127
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
128
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
129
|
+
* @throws {@link Ichos.NotFoundError}
|
|
130
|
+
* @throws {@link Ichos.InternalServerError}
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* await client.ads.listAdWeights()
|
|
134
|
+
*/
|
|
135
|
+
listAdWeights(requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdWeightListResponse>;
|
|
136
|
+
private __listAdWeights;
|
|
137
|
+
/**
|
|
138
|
+
* Update the ad weight for a virtual user or organization
|
|
139
|
+
*
|
|
140
|
+
* @param {Ichos.UpdateAdWeightRequest} request
|
|
141
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
142
|
+
*
|
|
143
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
144
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
145
|
+
* @throws {@link Ichos.NotFoundError}
|
|
146
|
+
* @throws {@link Ichos.InternalServerError}
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* await client.ads.updateAdWeight({
|
|
150
|
+
* weight: 1.1
|
|
151
|
+
* })
|
|
152
|
+
*/
|
|
153
|
+
updateAdWeight(request: Ichos.UpdateAdWeightRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdWeightListResponse>;
|
|
154
|
+
private __updateAdWeight;
|
|
155
|
+
/**
|
|
156
|
+
* Retrieve all ad weights for the organization
|
|
157
|
+
*
|
|
158
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
159
|
+
*
|
|
160
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
161
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
162
|
+
* @throws {@link Ichos.NotFoundError}
|
|
163
|
+
* @throws {@link Ichos.InternalServerError}
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* await client.ads.listAllAdWeights()
|
|
167
|
+
*/
|
|
168
|
+
listAllAdWeights(requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdWeightListResponse>;
|
|
169
|
+
private __listAllAdWeights;
|
|
170
|
+
/**
|
|
171
|
+
* Update multiple ad weights in bulk
|
|
172
|
+
*
|
|
173
|
+
* @param {Ichos.AdWeight[]} request
|
|
174
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
175
|
+
*
|
|
176
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
177
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
178
|
+
* @throws {@link Ichos.NotFoundError}
|
|
179
|
+
* @throws {@link Ichos.InternalServerError}
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* await client.ads.updateAdWeightBulk([{
|
|
183
|
+
* organizationId: "organizationId",
|
|
184
|
+
* weight: 1.1
|
|
185
|
+
* }])
|
|
186
|
+
*/
|
|
187
|
+
updateAdWeightBulk(request: Ichos.AdWeight[], requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdWeightListResponse>;
|
|
188
|
+
private __updateAdWeightBulk;
|
|
189
|
+
/**
|
|
190
|
+
* Create a new ad insertion point for an episode
|
|
191
|
+
*
|
|
192
|
+
* @param {Ichos.AdInsertionPointCreate} request
|
|
193
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
194
|
+
*
|
|
195
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
196
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
197
|
+
* @throws {@link Ichos.NotFoundError}
|
|
198
|
+
* @throws {@link Ichos.InternalServerError}
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* await client.ads.createAdInsertionPoint({
|
|
202
|
+
* episodeId: "episodeId",
|
|
203
|
+
* offsetSeconds: 1.1
|
|
204
|
+
* })
|
|
205
|
+
*/
|
|
206
|
+
createAdInsertionPoint(request: Ichos.AdInsertionPointCreate, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdInsertionPointResponse>;
|
|
207
|
+
private __createAdInsertionPoint;
|
|
208
|
+
/**
|
|
209
|
+
* Retrieve all ad insertion points for a specific episode
|
|
210
|
+
*
|
|
211
|
+
* @param {Ichos.ListAdInsertionPointsRequest} request
|
|
212
|
+
* @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
213
|
+
*
|
|
214
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
215
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
216
|
+
* @throws {@link Ichos.NotFoundError}
|
|
217
|
+
* @throws {@link Ichos.InternalServerError}
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* await client.ads.listAdInsertionPoints({
|
|
221
|
+
* episodeId: "episodeId"
|
|
222
|
+
* })
|
|
223
|
+
*/
|
|
224
|
+
listAdInsertionPoints(request: Ichos.ListAdInsertionPointsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise<Ichos.AdInsertionPointListResponse>;
|
|
225
|
+
private __listAdInsertionPoints;
|
|
226
|
+
}
|