From c81ef42fde48e7fbb47191206aacf8c2e78c8ad8 Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Thu, 12 Feb 2026 09:50:52 -0800 Subject: [PATCH 1/2] Migrate off v1/full to v1 --- packages/commands/src/album/get-album.ts | 2 +- .../commands/src/playlist/get-playlist.ts | 2 +- packages/commands/src/track/get-track.ts | 2 +- packages/commands/src/user/get-user.ts | 2 +- packages/commands/src/utils.ts | 4 +- packages/common/src/adapters/collection.ts | 6 +- .../__tests__/getUsersBatcher.test.ts | 10 +- .../collection/useCollectionFavorites.ts | 2 +- .../collection/useCollectionReposts.ts | 2 +- .../collection/useLibraryCollections.ts | 4 +- .../src/api/tan-query/comments/useComment.ts | 2 +- .../tan-query/comments/useCommentReplies.ts | 9 +- .../api/tan-query/comments/useUserComments.ts | 9 +- .../src/api/tan-query/lineups/useFeed.ts | 2 +- .../api/tan-query/lineups/useLibraryTracks.ts | 2 +- .../tan-query/lineups/useProfileReposts.ts | 2 +- .../useNotificationUnreadCount.ts | 2 +- .../notifications/useNotifications.ts | 2 +- .../purchases/useAudioTransactions.ts | 2 +- .../purchases/useAudioTransactionsCount.ts | 2 +- .../api/tan-query/purchases/usePurchasers.ts | 2 +- .../tan-query/purchases/usePurchasersCount.ts | 2 +- .../api/tan-query/purchases/usePurchases.ts | 2 +- .../tan-query/purchases/usePurchasesCount.ts | 2 +- .../src/api/tan-query/purchases/useSales.ts | 2 +- .../api/tan-query/purchases/useSalesCount.ts | 2 +- .../purchases/useUSDCTransactions.ts | 2 +- .../purchases/useUSDCTransactionsCount.ts | 2 +- .../src/api/tan-query/remixes/useRemixers.ts | 2 +- .../api/tan-query/remixes/useRemixersCount.ts | 2 +- .../tan-query/search/useSearchAutocomplete.ts | 2 +- .../api/tan-query/search/useSearchResults.ts | 4 +- .../tracks/useRecentlyPlayedTracks.ts | 2 +- .../tan-query/tracks/useRecommendedTracks.ts | 2 +- .../api/tan-query/tracks/useTrackHistory.ts | 2 +- .../users/account/useCurrentAccount.ts | 2 +- .../users/account/useManagedAccounts.ts | 2 +- .../tan-query/users/account/useManagers.ts | 2 +- .../tan-query/users/account/useWalletUser.ts | 2 +- .../src/api/tan-query/users/useFollowers.ts | 2 +- .../src/api/tan-query/users/useFollowing.ts | 2 +- .../src/api/tan-query/users/useMutedUsers.ts | 2 +- .../api/tan-query/users/useMutualFollowers.ts | 2 +- .../api/tan-query/users/useRelatedArtists.ts | 2 +- .../tan-query/users/useTopArtistsInGenre.ts | 2 +- packages/common/src/store/account/sagas.ts | 2 +- .../playlist-updates/playlistUpdatesSagas.ts | 2 +- .../src/store/purchase-content/sagas.ts | 14 +- .../src/store/ui/search-users-modal/sagas.ts | 2 +- .../common/src/store/ui/share-modal/sagas.ts | 7 +- .../examples/react-hono/src/index.tsx | 2 +- packages/embed/src/util/BedtimeClient.js | 6 +- .../workers/downloadCollectionWorker.ts | 2 +- .../sagas/requestDownloadCollectionSaga.ts | 2 +- .../sdk/src/sdk/api/comments/CommentsAPI.ts | 2 + .../api/developer-apps/DeveloperAppsApi.ts | 2 + .../default/.openapi-generator/FILES | 223 ++ .../generated/default/apis/ChallengesApi.ts | 65 + .../api/generated/default/apis/CidDataApi.ts | 66 + .../api/generated/default/apis/CommentsApi.ts | 300 ++ .../default/apis/DeveloperAppsApi.ts | 171 +- .../default/apis/NotificationsApi.ts | 174 + .../generated/default/apis/PlaylistsApi.ts | 371 +++ .../generated/default/apis/ReactionsApi.ts | 75 + .../api/generated/default/apis/SearchApi.ts | 412 +++ .../api/generated/default/apis/TracksApi.ts | 573 ++++ .../generated/default/apis/TransactionsApi.ts | 159 + .../api/generated/default/apis/UsersApi.ts | 2929 ++++++++++++++--- .../sdk/api/generated/default/apis/index.ts | 5 + .../default/models/AccountCollection.ts | 110 + .../default/models/AccountCollectionUser.ts | 84 + .../generated/default/models/AccountFull.ts | 112 + .../generated/default/models/ActivityFull.ts | 118 + .../models/AnnouncementNotification.ts | 109 + .../models/AnnouncementNotificationAction.ts | 101 + .../AnnouncementNotificationActionData.ts | 103 + .../ApproveManagerRequestNotification.ts | 109 + ...ApproveManagerRequestNotificationAction.ts | 101 + ...oveManagerRequestNotificationActionData.ts | 85 + .../ArtistRemixContestEndedNotification.ts | 109 + ...tistRemixContestEndedNotificationAction.ts | 101 + ...RemixContestEndedNotificationActionData.ts | 67 + ...rtistRemixContestEndingSoonNotification.ts | 109 + ...emixContestEndingSoonNotificationAction.ts | 101 + ...ContestEndingSoonNotificationActionData.ts | 76 + ...tistRemixContestSubmissionsNotification.ts | 109 + ...mixContestSubmissionsNotificationAction.ts | 101 + ...ontestSubmissionsNotificationActionData.ts | 85 + .../generated/default/models/Attestation.ts | 76 + .../default/models/AttestationReponse.ts | 73 + .../models/ChallengeRewardNotification.ts | 109 + .../ChallengeRewardNotificationAction.ts | 101 + .../ChallengeRewardNotificationActionData.ts | 93 + .../api/generated/default/models/CidData.ts | 82 + .../default/models/CidDataResponse.ts | 73 + .../models/ClaimableRewardNotification.ts | 109 + .../ClaimableRewardNotificationAction.ts | 101 + .../ClaimableRewardNotificationActionData.ts | 85 + .../CollectionActivityFullWithoutTracks.ts | 99 + .../models/CollectionLibraryResponseFull.ts | 142 + .../models/CommentMentionNotification.ts | 109 + .../CommentMentionNotificationAction.ts | 101 + .../CommentMentionNotificationActionData.ts | 114 + .../default/models/CommentNotification.ts | 109 + .../models/CommentNotificationAction.ts | 101 + .../models/CommentNotificationActionData.ts | 105 + .../models/CommentReactionNotification.ts | 109 + .../CommentReactionNotificationAction.ts | 101 + .../CommentReactionNotificationActionData.ts | 114 + .../models/CommentThreadNotification.ts | 109 + .../models/CommentThreadNotificationAction.ts | 101 + .../CommentThreadNotificationActionData.ts | 114 + .../default/models/CosignNotification.ts | 109 + .../models/CosignNotificationAction.ts | 101 + .../models/CosignNotificationActionData.ts | 85 + .../api/generated/default/models/CoverArt.ts | 82 + .../default/models/CoverPhotoFull.ts | 82 + .../models/CreateComment201Response.ts | 74 + .../default/models/CreateCommentRequest.ts | 101 + .../models/CreateDeveloperAppRequest.ts | 101 + .../CreateDeveloperAppRequestAppSignature.ts | 76 + .../default/models/CreateNotification.ts | 109 + .../models/CreateNotificationAction.ts | 101 + .../models/CreateNotificationActionData.ts | 66 + .../models/CreatePlaylist201Response.ts | 82 + .../CreatePlaylistNotificationActionData.ts | 76 + .../default/models/CreatePlaylistRequest.ts | 194 ++ ...atePlaylistRequestPlaylistContentsInner.ts | 84 + .../default/models/CreateTrack201Response.ts | 82 + .../CreateTrackNotificationActionData.ts | 67 + .../default/models/CreateTrackRequest.ts | 213 ++ .../default/models/CreateUser201Response.ts | 82 + .../default/models/CreateUserRequest.ts | 196 ++ .../generated/default/models/DataAndType.ts | 81 + .../FanRemixContestEndedNotification.ts | 109 + .../FanRemixContestEndedNotificationAction.ts | 101 + ...RemixContestEndedNotificationActionData.ts | 76 + .../FanRemixContestEndingSoonNotification.ts | 109 + ...emixContestEndingSoonNotificationAction.ts | 101 + ...ContestEndingSoonNotificationActionData.ts | 76 + .../FanRemixContestStartedNotification.ts | 109 + ...anRemixContestStartedNotificationAction.ts | 101 + ...mixContestStartedNotificationActionData.ts | 76 + ...RemixContestWinnersSelectedNotification.ts | 109 + ...ontestWinnersSelectedNotificationAction.ts | 101 + ...stWinnersSelectedNotificationActionData.ts | 76 + .../default/models/FieldVisibility.ts | 112 + .../default/models/FollowNotification.ts | 109 + .../models/FollowNotificationAction.ts | 101 + .../models/FollowNotificationActionData.ts | 76 + .../models/FullBulkSubscribersResponse.ts | 142 + .../default/models/FullGetSupporter.ts | 142 + .../default/models/FullGetSupporting.ts | 142 + .../api/generated/default/models/FullRemix.ts | 101 + .../default/models/FullRemixParent.ts | 73 + .../generated/default/models/FullReposts.ts | 142 + .../generated/default/models/FullSupporter.ts | 92 + .../default/models/FullSupporting.ts | 92 + .../default/models/FullTracksResponse.ts | 142 + .../models/FullTrendingPlaylistsResponse.ts | 142 + .../sdk/api/generated/default/models/Grant.ts | 112 + .../ListenStreakReminderNotification.ts | 109 + .../ListenStreakReminderNotificationAction.ts | 101 + ...tenStreakReminderNotificationActionData.ts | 67 + .../generated/default/models/ManagedUser.ts | 89 + .../default/models/ManagedUsersResponse.ts | 73 + .../default/models/ManagersResponse.ts | 73 + .../default/models/MilestoneNotification.ts | 109 + .../models/MilestoneNotificationAction.ts | 101 + .../models/MilestoneNotificationActionData.ts | 76 + .../generated/default/models/Notification.ts | 495 +++ .../generated/default/models/Notifications.ts | 82 + .../default/models/NotificationsResponse.ts | 142 + .../default/models/PlaylistArtworkFull.ts | 90 + .../default/models/PlaylistFeedItem.ts | 83 + .../generated/default/models/PlaylistFull.ts | 458 +++ .../models/PlaylistFullWithoutTracks.ts | 458 +++ .../default/models/PlaylistLibrary.ts | 66 + ...PlaylistMilestoneNotificationActionData.ts | 94 + .../default/models/PlaylistUpdate.ts | 84 + .../default/models/PlaylistUpdates.ts | 73 + .../default/models/PlaylistUpdatesResponse.ts | 142 + .../default/models/ProfilePictureFull.ts | 90 + .../api/generated/default/models/Purchase.ts | 178 + .../generated/default/models/PurchaseSplit.ts | 84 + .../default/models/PurchasersCountResponse.ts | 136 + .../default/models/PurchasesCountResponse.ts | 136 + .../default/models/PurchasesResponse.ts | 142 + .../api/generated/default/models/Reaction.ts | 94 + .../default/models/ReactionNotification.ts | 109 + .../models/ReactionNotificationAction.ts | 101 + .../models/ReactionNotificationActionData.ts | 121 + .../api/generated/default/models/Reactions.ts | 73 + .../default/models/ReceiveTipNotification.ts | 109 + .../models/ReceiveTipNotificationAction.ts | 101 + .../ReceiveTipNotificationActionData.ts | 103 + .../models/RecordTrackDownloadRequest.ts | 82 + .../default/models/RemixNotification.ts | 109 + .../default/models/RemixNotificationAction.ts | 101 + .../models/RemixNotificationActionData.ts | 76 + .../default/models/RemixablesResponse.ts | 142 + .../default/models/RemixersCountResponse.ts | 136 + .../default/models/RepostNotification.ts | 109 + .../models/RepostNotificationAction.ts | 101 + .../models/RepostNotificationActionData.ts | 97 + .../models/RepostOfRepostNotification.ts | 109 + .../RepostOfRepostNotificationAction.ts | 101 + .../RepostOfRepostNotificationActionData.ts | 97 + .../models/RequestManagerNotification.ts | 109 + .../RequestManagerNotificationAction.ts | 101 + .../RequestManagerNotificationActionData.ts | 85 + .../default/models/SaveNotification.ts | 109 + .../default/models/SaveNotificationAction.ts | 101 + .../models/SaveNotificationActionData.ts | 97 + .../models/SaveOfRepostNotification.ts | 109 + .../models/SaveOfRepostNotificationAction.ts | 101 + .../SaveOfRepostNotificationActionData.ts | 97 + .../models/SearchAutocompleteResponse.ts | 142 + .../default/models/SearchFullResponse.ts | 142 + .../generated/default/models/SearchModel.ts | 145 + .../default/models/SearchPlaylistFull.ts | 456 +++ .../default/models/SearchTrackFull.ts | 812 +++++ .../default/models/SendTipNotification.ts | 109 + .../models/SendTipNotificationAction.ts | 101 + .../models/SendTipNotificationActionData.ts | 94 + .../generated/default/models/StemParent.ts | 76 + .../models/SupporterDethronedNotification.ts | 109 + .../SupporterDethronedNotificationAction.ts | 101 + ...upporterDethronedNotificationActionData.ts | 85 + .../models/SupporterRankUpNotification.ts | 109 + .../SupporterRankUpNotificationAction.ts | 101 + .../SupporterRankUpNotificationActionData.ts | 85 + .../default/models/TastemakerNotification.ts | 109 + .../models/TastemakerNotificationAction.ts | 101 + .../TastemakerNotificationActionData.ts | 103 + .../default/models/TierChangeNotification.ts | 109 + .../models/TierChangeNotificationAction.ts | 101 + .../TierChangeNotificationActionData.ts | 85 + .../models/TopGenreUsersResponseFull.ts | 142 + .../default/models/TopUsersResponseFull.ts | 142 + .../default/models/TrackActivityFull.ts | 99 + .../TrackAddedToPlaylistNotification.ts | 109 + .../TrackAddedToPlaylistNotificationAction.ts | 101 + ...ckAddedToPlaylistNotificationActionData.ts | 85 + .../TrackAddedToPurchasedAlbumNotification.ts | 109 + ...AddedToPurchasedAlbumNotificationAction.ts | 101 + ...dToPurchasedAlbumNotificationActionData.ts | 85 + .../default/models/TrackArtworkFull.ts | 90 + .../generated/default/models/TrackFeedItem.ts | 83 + .../api/generated/default/models/TrackFull.ts | 814 +++++ .../models/TrackLibraryResponseFull.ts | 142 + .../TrackMilestoneNotificationActionData.ts | 85 + .../generated/default/models/TrackSegment.ts | 76 + .../default/models/TransactionDetails.ts | 135 + .../models/TransactionHistoryCountResponse.ts | 136 + .../models/TransactionHistoryResponse.ts | 142 + .../default/models/TrendingNotification.ts | 109 + .../models/TrendingNotificationAction.ts | 101 + .../models/TrendingNotificationActionData.ts | 106 + .../models/TrendingPlaylistNotification.ts | 109 + .../TrendingPlaylistNotificationAction.ts | 101 + .../TrendingPlaylistNotificationActionData.ts | 106 + .../models/TrendingUndergroundNotification.ts | 109 + .../TrendingUndergroundNotificationAction.ts | 101 + ...endingUndergroundNotificationActionData.ts | 106 + .../default/models/UpdateCommentRequest.ts | 67 + .../models/UpdateDeveloperAppRequest.ts | 85 + .../default/models/UpdatePlaylistRequest.ts | 113 + ...atePlaylistRequestPlaylistContentsInner.ts | 74 + .../default/models/UpdateTrackRequest.ts | 138 + .../default/models/UpdateUserRequest.ts | 194 ++ .../default/models/UrlWithMirrors.ts | 75 + .../models/UsdcPurchaseBuyerNotification.ts | 109 + .../UsdcPurchaseBuyerNotificationAction.ts | 101 + ...UsdcPurchaseBuyerNotificationActionData.ts | 112 + .../models/UsdcPurchaseSellerNotification.ts | 109 + .../UsdcPurchaseSellerNotificationAction.ts | 101 + ...sdcPurchaseSellerNotificationActionData.ts | 112 + .../default/models/UserAccountResponseFull.ts | 73 + .../generated/default/models/UserFeedItem.ts | 73 + .../default/models/UserFeedResponse.ts | 142 + .../api/generated/default/models/UserFull.ts | 614 ++++ .../default/models/UserFullArtistCoinBadge.ts | 90 + .../generated/default/models/UserManager.ts | 89 + .../UserMilestoneNotificationActionData.ts | 85 + .../default/models/UserSubscribers.ts | 75 + .../default/models/VersionMetadata.ts | 76 + .../sdk/api/generated/default/models/index.ts | 218 ++ .../sdk/api/notifications/NotificationsApi.ts | 22 +- .../sdk/src/sdk/api/playlists/PlaylistsApi.ts | 26 +- packages/sdk/src/sdk/api/tracks/TracksApi.ts | 2 + packages/sdk/src/sdk/api/users/UsersApi.ts | 61 +- packages/sdk/src/sdk/config/production.ts | 2 +- .../src/sdk/examples/signed-request/index.ts | 2 +- packages/sdk/src/sdk/index.ts | 2 +- .../sdk/middleware/addAppInfoMiddleware.ts | 9 +- packages/sdk/src/sdk/sdk.ts | 36 +- .../cache/collections/createAlbumSaga.ts | 2 +- .../cache/collections/createPlaylistSaga.ts | 2 +- .../common/store/pages/feed/lineup/sagas.ts | 21 +- .../src/common/store/pages/library/sagas.ts | 2 +- .../lineups/feed/retrieveUserReposts.ts | 2 +- .../lineups/tracks/retrieveUserTracks.ts | 2 +- .../src/common/store/search-ai-bar/sagas.ts | 17 +- .../pages/oauth-login-page/OAuthLoginPage.tsx | 2 +- .../oauth-login-page/OAuthSignUpPage.tsx | 2 +- .../web/src/pages/oauth-login-page/utils.ts | 9 +- .../components/useExternalWalletAuth.ts | 2 +- 308 files changed, 31412 insertions(+), 564 deletions(-) create mode 100644 packages/sdk/src/sdk/api/generated/default/apis/CidDataApi.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/apis/NotificationsApi.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/apis/ReactionsApi.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/apis/SearchApi.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/apis/TransactionsApi.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/AccountCollection.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/AccountCollectionUser.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/AccountFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ActivityFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/Attestation.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/AttestationReponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CidData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CidDataResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CollectionActivityFullWithoutTracks.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponseFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CosignNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CosignNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CosignNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CoverArt.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CoverPhotoFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateComment201Response.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateCommentRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequestAppSignature.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreatePlaylist201Response.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequestPlaylistContentsInner.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateTrack201Response.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateTrackNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateTrackRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateUser201Response.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/CreateUserRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/DataAndType.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FollowNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FollowNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FollowNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullBulkSubscribersResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullGetSupporter.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullGetSupporting.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullRemix.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullRemixParent.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullReposts.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullSupporter.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullSupporting.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullTracksResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/FullTrendingPlaylistsResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/Grant.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ManagedUser.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ManagedUsersResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ManagersResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/MilestoneNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/Notification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/Notifications.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/NotificationsResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistArtworkFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistFeedItem.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistFullWithoutTracks.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistLibrary.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistMilestoneNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdate.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdates.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdatesResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ProfilePictureFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/Purchase.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PurchaseSplit.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PurchasersCountResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PurchasesCountResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PurchasesResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/Reaction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ReactionNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/Reactions.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RecordTrackDownloadRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RemixNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RemixNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RemixNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RemixablesResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RemixersCountResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RepostNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RepostNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RepostNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SaveNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SaveNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SaveNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SearchAutocompleteResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SearchFullResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SearchModel.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SearchPlaylistFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SearchTrackFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SendTipNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/StemParent.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TastemakerNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TierChangeNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TopGenreUsersResponseFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TopUsersResponseFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackActivityFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackArtworkFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackFeedItem.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponseFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackMilestoneNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrackSegment.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TransactionDetails.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryCountResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UpdateCommentRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UpdateDeveloperAppRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequestPlaylistContentsInner.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UpdateTrackRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequest.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotification.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationAction.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserAccountResponseFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserFeedItem.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserFeedResponse.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserFull.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserFullArtistCoinBadge.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserManager.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserMilestoneNotificationActionData.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UserSubscribers.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/VersionMetadata.ts diff --git a/packages/commands/src/album/get-album.ts b/packages/commands/src/album/get-album.ts index f8ac52af0a5..f4e2e4e7eb3 100644 --- a/packages/commands/src/album/get-album.ts +++ b/packages/commands/src/album/get-album.ts @@ -8,7 +8,7 @@ export const getAlbumCommand = new Command('get') .action(async (albumId, { from }) => { const audiusSdk = await initializeAudiusSdk({ handle: from }) const userId = await getCurrentUserId() - const { data: playlist } = await audiusSdk.full.playlists.getPlaylist({ + const { data: playlist } = await audiusSdk.playlists.getPlaylist({ userId, playlistId: albumId }) diff --git a/packages/commands/src/playlist/get-playlist.ts b/packages/commands/src/playlist/get-playlist.ts index bcc1b081008..22e3779c4a7 100644 --- a/packages/commands/src/playlist/get-playlist.ts +++ b/packages/commands/src/playlist/get-playlist.ts @@ -8,7 +8,7 @@ export const getPlaylistCommand = new Command('get') .action(async (playlistId, { from }) => { const audiusSdk = await initializeAudiusSdk({ handle: from }) const userId = await getCurrentUserId() - const { data: playlist } = await audiusSdk.full.playlists.getPlaylist({ + const { data: playlist } = await audiusSdk.playlists.getPlaylist({ userId, playlistId }) diff --git a/packages/commands/src/track/get-track.ts b/packages/commands/src/track/get-track.ts index c04fc8a3465..997d5045ba2 100644 --- a/packages/commands/src/track/get-track.ts +++ b/packages/commands/src/track/get-track.ts @@ -8,7 +8,7 @@ export const getTrackCommand = new Command('get') .action(async (trackId, { from }) => { const audiusSdk = await initializeAudiusSdk({ handle: from }) const userId = await getCurrentUserId() - const { data: track } = await audiusSdk.full.tracks.getTrack({ + const { data: track } = await audiusSdk.tracks.getTrack({ userId, trackId }) diff --git a/packages/commands/src/user/get-user.ts b/packages/commands/src/user/get-user.ts index 69a30ab6976..47f220522cd 100644 --- a/packages/commands/src/user/get-user.ts +++ b/packages/commands/src/user/get-user.ts @@ -8,6 +8,6 @@ export const getUserCommand = new Command('get') .action(async (id, { from }) => { const audiusSdk = await initializeAudiusSdk({ handle: from }) const userId = await getCurrentUserId() - const { data: track } = await audiusSdk.full.users.getUser({ userId, id }) + const { data: track } = await audiusSdk.users.getUser({ userId, id }) console.info(track) }) diff --git a/packages/commands/src/utils.ts b/packages/commands/src/utils.ts index e64d8d438ed..6294db423c4 100644 --- a/packages/commands/src/utils.ts +++ b/packages/commands/src/utils.ts @@ -207,7 +207,7 @@ export const getCurrentUserId = async () => { throw new Error('sdk not initialized') } const [address] = await audiusSdk.services.audiusWalletClient.getAddresses() - const { data } = await audiusSdk.full.users.getUserAccount({ + const { data } = await audiusSdk.users.getUserAccount({ wallet: address }) if (!data?.user) { @@ -224,7 +224,7 @@ export const getCurrentUserHandle = async () => { return currentHandle } const [address] = await audiusSdk.services.audiusWalletClient.getAddresses() - const { data } = await audiusSdk.full.users.getUserAccount({ + const { data } = await audiusSdk.users.getUserAccount({ wallet: address }) if (!data?.user) { diff --git a/packages/common/src/adapters/collection.ts b/packages/common/src/adapters/collection.ts index 3dc756dddcf..79391096541 100644 --- a/packages/common/src/adapters/collection.ts +++ b/packages/common/src/adapters/collection.ts @@ -5,6 +5,7 @@ import { Id, OptionalHashId, type Playlist, + type PlaylistFullWithoutTracks as DefaultPlaylistFullWithoutTracks, UpdateAlbumRequest, UpdatePlaylistRequest } from '@audius/sdk' @@ -52,6 +53,7 @@ type CollectionFromSDK = | full.PlaylistFullWithoutTracks | full.SearchPlaylistFull | full.PlaylistFull + | DefaultPlaylistFullWithoutTracks function collectionArtworkFromSDK( art: CollectionFromSDK['artwork'] @@ -138,7 +140,9 @@ export const userCollectionMetadataFromSDK = ( ? accessConditionsFromSDK(input.streamConditions as full.AccessGate) : null, tracks: transformAndCleanList( - 'tracks' in input ? (input.tracks ?? []) : [], + ('tracks' in input ? (input.tracks ?? []) : []) as Parameters< + typeof userTrackMetadataFromSDK + >[0][], userTrackMetadataFromSDK ), cover_art: 'coverArt' in input ? (input.coverArt ?? null) : null, diff --git a/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts b/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts index 6c48fcca985..0530e54ed56 100644 --- a/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts +++ b/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts @@ -109,7 +109,7 @@ describe('getUsersBatcher', () => { const results = await Promise.all(ids.map((id) => batcher.fetch(id))) // Verify single bulk request was made - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledTimes(1) + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledTimes(1) expect(mockSdk.users.getBulkUsers).toHaveBeenCalledWith({ id: ids.map((id) => Id.parse(id)), userId: OptionalId.parse(null) @@ -142,12 +142,12 @@ describe('getUsersBatcher', () => { ) // Verify two separate bulk requests were made - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledTimes(2) - expect(mockSdk.full.users.getBulkUsers).toHaveBeenNthCalledWith(1, { + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledTimes(2) + expect(mockSdk.users.getBulkUsers).toHaveBeenNthCalledWith(1, { id: firstBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) - expect(mockSdk.full.users.getBulkUsers).toHaveBeenNthCalledWith(2, { + expect(mockSdk.users.getBulkUsers).toHaveBeenNthCalledWith(2, { id: secondBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) @@ -199,7 +199,7 @@ describe('getUsersBatcher', () => { expect(missingResult).toBeNull() // Verify single batch request was made with both IDs - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledTimes(1) + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledTimes(1) expect(mockSdk.users.getBulkUsers).toHaveBeenCalledWith({ id: [missingId, existingId].map((id) => Id.parse(id)), userId: OptionalId.parse(null) diff --git a/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts b/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts index 757dc333bbf..d70aa53f821 100644 --- a/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts +++ b/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts @@ -46,7 +46,7 @@ export const useCollectionFavorites = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.playlists.getUsersFromPlaylistFavorites({ + const { data } = await sdk.playlists.getUsersFromPlaylistFavorites({ playlistId: Id.parse(collectionId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/collection/useCollectionReposts.ts b/packages/common/src/api/tan-query/collection/useCollectionReposts.ts index 44298b5e13a..eb868f89d83 100644 --- a/packages/common/src/api/tan-query/collection/useCollectionReposts.ts +++ b/packages/common/src/api/tan-query/collection/useCollectionReposts.ts @@ -46,7 +46,7 @@ export const useCollectionReposts = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.playlists.getUsersFromPlaylistReposts({ + const { data } = await sdk.playlists.getUsersFromPlaylistReposts({ playlistId: Id.parse(collectionId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/collection/useLibraryCollections.ts b/packages/common/src/api/tan-query/collection/useLibraryCollections.ts index c632977bba6..15715ec23dd 100644 --- a/packages/common/src/api/tan-query/collection/useLibraryCollections.ts +++ b/packages/common/src/api/tan-query/collection/useLibraryCollections.ts @@ -94,8 +94,8 @@ export const useLibraryCollections = ( const { data: activities = [] } = collectionType === 'albums' - ? await sdk.full.users.getUserLibraryAlbums(requestParams) - : await sdk.full.users.getUserLibraryPlaylists(requestParams) + ? await sdk.users.getUserLibraryAlbums(requestParams) + : await sdk.users.getUserLibraryPlaylists(requestParams) const collections = transformAndCleanList(activities, ({ item }) => userCollectionMetadataFromSDK(item) diff --git a/packages/common/src/api/tan-query/comments/useComment.ts b/packages/common/src/api/tan-query/comments/useComment.ts index 751d3446213..2f6a17018cc 100644 --- a/packages/common/src/api/tan-query/comments/useComment.ts +++ b/packages/common/src/api/tan-query/comments/useComment.ts @@ -21,7 +21,7 @@ export const useComment = (commentId: ID | null | undefined) => { enabled: !!commentId, queryFn: async () => { const sdk = await audiusSdk() - const { data: commentRes } = await sdk.full.comments.getComment({ + const { data: commentRes } = await sdk.comments.getComment({ commentId: Id.parse(commentId) }) diff --git a/packages/common/src/api/tan-query/comments/useCommentReplies.ts b/packages/common/src/api/tan-query/comments/useCommentReplies.ts index 4d9e4265e30..4dbe1b02410 100644 --- a/packages/common/src/api/tan-query/comments/useCommentReplies.ts +++ b/packages/common/src/api/tan-query/comments/useCommentReplies.ts @@ -1,6 +1,6 @@ import { useEffect } from 'react' -import { Id } from '@audius/sdk' +import { full, Id } from '@audius/sdk' import { useInfiniteQuery, useQueryClient } from '@tanstack/react-query' import { useDispatch } from 'react-redux' @@ -42,7 +42,7 @@ export const useCommentReplies = ( }, queryFn: async ({ pageParam }): Promise => { const sdk = await audiusSdk() - const response = await sdk.full.comments.getCommentReplies({ + const response = await sdk.comments.getCommentReplies({ commentId: Id.parse(commentId), userId: currentUserId?.toString(), limit: pageSize, @@ -51,7 +51,10 @@ export const useCommentReplies = ( const replies = transformAndCleanList(response.data, replyCommentFromSDK) - primeRelatedData({ related: response.related, queryClient }) + primeRelatedData({ + related: (response as { related?: full.Related }).related, + queryClient + }) // Update the parent comment with the new replies and prime the reply data // Add the replies to our parent comment replies list diff --git a/packages/common/src/api/tan-query/comments/useUserComments.ts b/packages/common/src/api/tan-query/comments/useUserComments.ts index 445f97395fa..ab905daf0c4 100644 --- a/packages/common/src/api/tan-query/comments/useUserComments.ts +++ b/packages/common/src/api/tan-query/comments/useUserComments.ts @@ -1,6 +1,6 @@ import { useEffect } from 'react' -import { Id, OptionalId } from '@audius/sdk' +import { full, Id, OptionalId } from '@audius/sdk' import { useInfiniteQuery, useIsMutating, @@ -46,7 +46,7 @@ export const useUserComments = ( queryKey: ['userCommentList', userId, pageSize], queryFn: async ({ pageParam }): Promise => { const sdk = await audiusSdk() - const commentsRes = await sdk.full.users.getUserComments({ + const commentsRes = await sdk.users.getUserComments({ id: Id.parse(userId), userId: OptionalId.parse(currentUserId), offset: pageParam, @@ -58,7 +58,10 @@ export const useUserComments = ( commentFromSDK ) - primeRelatedData({ related: commentsRes.related, queryClient }) + primeRelatedData({ + related: (commentsRes as { related?: full.Related }).related, + queryClient + }) // Prime comment data in the cache primeCommentData({ comments: commentList, queryClient }) diff --git a/packages/common/src/api/tan-query/lineups/useFeed.ts b/packages/common/src/api/tan-query/lineups/useFeed.ts index c5aca3ba530..21ea13d01a2 100644 --- a/packages/common/src/api/tan-query/lineups/useFeed.ts +++ b/packages/common/src/api/tan-query/lineups/useFeed.ts @@ -70,7 +70,7 @@ export const useFeed = ( const isFirstPage = pageParam === 0 const currentPageSize = isFirstPage ? initialPageSize : loadMorePageSize const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUserFeed({ + const { data = [] } = await sdk.users.getUserFeed({ id: Id.parse(currentUserId), userId: Id.parse(currentUserId), filter: filterMap[filter], diff --git a/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts b/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts index 883a2c6b6e2..4533165f47f 100644 --- a/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts +++ b/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts @@ -86,7 +86,7 @@ export const useLibraryTracks = ( queryFn: async ({ pageParam = 0 }) => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUserLibraryTracks({ + const { data = [] } = await sdk.users.getUserLibraryTracks({ id: Id.parse(currentUserId), offset: pageParam, limit: pageSize, diff --git a/packages/common/src/api/tan-query/lineups/useProfileReposts.ts b/packages/common/src/api/tan-query/lineups/useProfileReposts.ts index 219ab5d9bf6..7260b553198 100644 --- a/packages/common/src/api/tan-query/lineups/useProfileReposts.ts +++ b/packages/common/src/api/tan-query/lineups/useProfileReposts.ts @@ -60,7 +60,7 @@ export const useProfileReposts = ( // If the @ is still at the beginning of the handle, trim it off const handleNoAt = handle.startsWith('@') ? handle.substring(1) : handle - const { data: repostsSDKData } = await sdk.full.users.getRepostsByHandle({ + const { data: repostsSDKData } = await sdk.users.getRepostsByHandle({ handle: handleNoAt, userId: OptionalId.parse(currentUserId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts b/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts index 372e1d350f2..30a6ea93327 100644 --- a/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts +++ b/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts @@ -32,7 +32,7 @@ export const useNotificationUnreadCount = () => { queryKey: getNotificationUnreadCountQueryKey(currentUserId), queryFn: async () => { const sdk = await audiusSdk() - const { data } = await sdk.full.notifications.getNotifications({ + const { data } = await sdk.notifications.getNotifications({ userId: Id.parse(currentUserId), limit: 0 }) diff --git a/packages/common/src/api/tan-query/notifications/useNotifications.ts b/packages/common/src/api/tan-query/notifications/useNotifications.ts index b4aa54e9bb6..d84a935323b 100644 --- a/packages/common/src/api/tan-query/notifications/useNotifications.ts +++ b/packages/common/src/api/tan-query/notifications/useNotifications.ts @@ -202,7 +202,7 @@ export const useNotifications = (options?: QueryOptions) => { initialPageParam: null as PageParam, queryFn: async ({ pageParam = null }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.notifications.getNotifications({ + const { data } = await sdk.notifications.getNotifications({ userId: Id.parse(currentUserId), limit: DEFAULT_LIMIT, timestamp: pageParam?.timestamp, diff --git a/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts b/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts index 68bfbbd3177..e11d56fdba9 100644 --- a/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts +++ b/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts @@ -63,7 +63,7 @@ export const useAudioTransactions = ( if (!userId) return [] const sdk = await audiusSdk() - const response = await sdk.full.users.getAudioTransactions({ + const response = await sdk.users.getAudioTransactions({ id: Id.parse(userId), offset: page * pageSize, limit: pageSize, diff --git a/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts b/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts index 989e5d914fe..15ce8d82222 100644 --- a/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts +++ b/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts @@ -30,7 +30,7 @@ export const useAudioTransactionsCount = ( if (!userId) return 0 const sdk = await audiusSdk() - const response = await sdk.full.users.getAudioTransactionCount({ + const response = await sdk.users.getAudioTransactionCount({ id: Id.parse(userId) }) diff --git a/packages/common/src/api/tan-query/purchases/usePurchasers.ts b/packages/common/src/api/tan-query/purchases/usePurchasers.ts index 2b94a84f637..ba99e689dd0 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchasers.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchasers.ts @@ -56,7 +56,7 @@ export const usePurchasers = ( queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() if (!currentUserId) return [] - const { data = [] } = await sdk.full.users.getPurchasers({ + const { data = [] } = await sdk.users.getPurchasers({ id: Id.parse(currentUserId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts b/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts index 3a08b0c20be..9fbbb4a32d0 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts @@ -37,7 +37,7 @@ export const usePurchasersCount = ( queryFn: async () => { const sdk = await audiusSdk() if (!currentUserId) return 0 - const { data = 0 } = await sdk.full.users.getPurchasersCount({ + const { data = 0 } = await sdk.users.getPurchasersCount({ id: Id.parse(currentUserId), userId: Id.parse(currentUserId), contentId: OptionalId.parse(contentId), diff --git a/packages/common/src/api/tan-query/purchases/usePurchases.ts b/packages/common/src/api/tan-query/purchases/usePurchases.ts index ea1d765e85f..4226b02e0b3 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchases.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchases.ts @@ -61,7 +61,7 @@ export const usePurchases = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getPurchases({ + const { data = [] } = await sdk.users.getPurchases({ id: Id.parse(userId), userId: Id.parse(userId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts b/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts index 9fb3f864bd5..855874eb148 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts @@ -28,7 +28,7 @@ export const usePurchasesCount = ( queryKey: getPurchasesCountQueryKey({ userId }), queryFn: async () => { const sdk = await audiusSdk() - const { data = 0 } = await sdk.full.users.getPurchasesCount({ + const { data = 0 } = await sdk.users.getPurchasesCount({ id: Id.parse(userId), userId: Id.parse(userId) }) diff --git a/packages/common/src/api/tan-query/purchases/useSales.ts b/packages/common/src/api/tan-query/purchases/useSales.ts index 485a7a922b6..7bb0c41ae5c 100644 --- a/packages/common/src/api/tan-query/purchases/useSales.ts +++ b/packages/common/src/api/tan-query/purchases/useSales.ts @@ -56,7 +56,7 @@ export const useSales = (args: GetSalesListArgs, options?: QueryOptions) => { }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getSales({ + const { data = [] } = await sdk.users.getSales({ id: Id.parse(userId!), userId: Id.parse(userId!), limit: pageSize, diff --git a/packages/common/src/api/tan-query/purchases/useSalesCount.ts b/packages/common/src/api/tan-query/purchases/useSalesCount.ts index 1a3e2c0f907..3396bda813b 100644 --- a/packages/common/src/api/tan-query/purchases/useSalesCount.ts +++ b/packages/common/src/api/tan-query/purchases/useSalesCount.ts @@ -22,7 +22,7 @@ export const useSalesCount = ( queryKey: getSalesCountQueryKey(userId), queryFn: async () => { const sdk = await audiusSdk() - const { data = 0 } = await sdk.full.users.getSalesCount({ + const { data = 0 } = await sdk.users.getSalesCount({ id: Id.parse(userId), userId: Id.parse(userId) }) diff --git a/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts b/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts index 4dde413cb3b..914378600aa 100644 --- a/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts +++ b/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts @@ -99,7 +99,7 @@ export const useUSDCTransactions = ( queryFn: async ({ pageParam }) => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUSDCTransactions({ + const { data = [] } = await sdk.users.getUSDCTransactions({ id: Id.parse(currentUserId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts b/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts index 64d7a74d900..8b3f444262c 100644 --- a/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts +++ b/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts @@ -37,7 +37,7 @@ export const useUSDCTransactionsCount = ( queryFn: async () => { if (!currentUserId) return 0 const sdk = await audiusSdk() - const { data } = await sdk.full.users.getUSDCTransactionCount({ + const { data } = await sdk.users.getUSDCTransactionCount({ id: Id.parse(currentUserId), type: args?.type, method: args?.method diff --git a/packages/common/src/api/tan-query/remixes/useRemixers.ts b/packages/common/src/api/tan-query/remixes/useRemixers.ts index 4559958c377..3f2cf4a01e1 100644 --- a/packages/common/src/api/tan-query/remixes/useRemixers.ts +++ b/packages/common/src/api/tan-query/remixes/useRemixers.ts @@ -48,7 +48,7 @@ export const useRemixers = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getRemixers({ + const { data = [] } = await sdk.users.getRemixers({ id: Id.parse(userId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/remixes/useRemixersCount.ts b/packages/common/src/api/tan-query/remixes/useRemixersCount.ts index a69ff8e790f..5cf4630644b 100644 --- a/packages/common/src/api/tan-query/remixes/useRemixersCount.ts +++ b/packages/common/src/api/tan-query/remixes/useRemixersCount.ts @@ -27,7 +27,7 @@ export const useRemixersCount = ( queryFn: async () => { const sdk = await audiusSdk() if (!currentUserId) return 0 - const { data = 0 } = await sdk.full.users.getRemixersCount({ + const { data = 0 } = await sdk.users.getRemixersCount({ id: Id.parse(currentUserId), userId: Id.parse(currentUserId), trackId: OptionalId.parse(trackId) diff --git a/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts b/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts index f222d8c32a7..e35ba56030a 100644 --- a/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts +++ b/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts @@ -44,7 +44,7 @@ export const useSearchAutocomplete = ( queryKey: getSearchAutocompleteQueryKey(currentUserId, { query, limit }), queryFn: async () => { const sdk = await audiusSdk() - const { data } = await sdk.full.search.searchAutocomplete({ + const { data } = await sdk.search.searchAutocomplete({ userId: OptionalId.parse(currentUserId), query, limit, diff --git a/packages/common/src/api/tan-query/search/useSearchResults.ts b/packages/common/src/api/tan-query/search/useSearchResults.ts index 955dd730e86..d41a86548ee 100644 --- a/packages/common/src/api/tan-query/search/useSearchResults.ts +++ b/packages/common/src/api/tan-query/search/useSearchResults.ts @@ -209,8 +209,8 @@ const useSearchQueryProps = ( } const { data } = isTagsSearch - ? await sdk.full.search.searchTags(searchParams) - : await sdk.full.search.search(searchParams) + ? await sdk.search.searchTags(searchParams) + : await sdk.search.search(searchParams) const { tracks, playlists, albums, users } = searchResultsFromSDK( data, diff --git a/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts b/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts index a82bf2a7512..6914a2da4cc 100644 --- a/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts +++ b/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts @@ -53,7 +53,7 @@ export const useRecentlyPlayedTracks = ( if (!currentUserId) return [] const sdk = await audiusSdk() const id = Id.parse(currentUserId) - const { data = [] } = await sdk.full.users.getUsersTrackHistory({ + const { data = [] } = await sdk.users.getUsersTrackHistory({ ...args, id, userId: id, diff --git a/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts b/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts index 38ce48f275f..4987fb8b8b7 100644 --- a/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts +++ b/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts @@ -53,7 +53,7 @@ export const useRecommendedTracks = ( queryFn: async ({ pageParam }) => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUserRecommendedTracks({ + const { data = [] } = await sdk.users.getUserRecommendedTracks({ ...args, id: Id.parse(currentUserId), userId: Id.parse(currentUserId), diff --git a/packages/common/src/api/tan-query/tracks/useTrackHistory.ts b/packages/common/src/api/tan-query/tracks/useTrackHistory.ts index 27b3819435f..4a265f04664 100644 --- a/packages/common/src/api/tan-query/tracks/useTrackHistory.ts +++ b/packages/common/src/api/tan-query/tracks/useTrackHistory.ts @@ -67,7 +67,7 @@ export const useTrackHistory = ( const id = Id.parse(currentUserId) - const { data: activityData } = await sdk.full.users.getUsersTrackHistory({ + const { data: activityData } = await sdk.users.getUsersTrackHistory({ id, userId: id, limit: pageSize, diff --git a/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts b/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts index b7f7f4ff039..12f75079db8 100644 --- a/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts +++ b/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts @@ -70,7 +70,7 @@ export const getCurrentAccountQueryFn = async ( return null } - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet: currentUserWallet! }) diff --git a/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts b/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts index 2d7d6f58120..ad7393c3206 100644 --- a/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts +++ b/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts @@ -26,7 +26,7 @@ export const useManagedAccounts = ( queryKey: getManagedAccountsQueryKey(userId), queryFn: async () => { const sdk = await audiusSdk() - const managedUsers = await sdk.full.users.getManagedUsers({ + const managedUsers = await sdk.users.getManagedUsers({ id: Id.parse(userId) }) const { data = [] } = managedUsers diff --git a/packages/common/src/api/tan-query/users/account/useManagers.ts b/packages/common/src/api/tan-query/users/account/useManagers.ts index 992459f823a..7b2351f72dc 100644 --- a/packages/common/src/api/tan-query/users/account/useManagers.ts +++ b/packages/common/src/api/tan-query/users/account/useManagers.ts @@ -24,7 +24,7 @@ export const useManagers = ( queryKey: getManagersQueryKey(userId), queryFn: async () => { const sdk = await audiusSdk() - const managers = await sdk.full.users.getManagers({ + const managers = await sdk.users.getManagers({ id: Id.parse(userId) }) const { data: rawData = [] } = managers diff --git a/packages/common/src/api/tan-query/users/account/useWalletUser.ts b/packages/common/src/api/tan-query/users/account/useWalletUser.ts index efea2a534b0..bcfb4e04d7d 100644 --- a/packages/common/src/api/tan-query/users/account/useWalletUser.ts +++ b/packages/common/src/api/tan-query/users/account/useWalletUser.ts @@ -33,7 +33,7 @@ export const getWalletAccountQueryFn = async ( sdk: AudiusSdk, queryClient: QueryClient ) => { - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet }) diff --git a/packages/common/src/api/tan-query/users/useFollowers.ts b/packages/common/src/api/tan-query/users/useFollowers.ts index daf4cbcc937..c8d91b499e5 100644 --- a/packages/common/src/api/tan-query/users/useFollowers.ts +++ b/packages/common/src/api/tan-query/users/useFollowers.ts @@ -49,7 +49,7 @@ export const useFollowers = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.users.getFollowers({ + const { data } = await sdk.users.getFollowers({ id: Id.parse(userId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/users/useFollowing.ts b/packages/common/src/api/tan-query/users/useFollowing.ts index d8254fc91c2..7a80cc0348c 100644 --- a/packages/common/src/api/tan-query/users/useFollowing.ts +++ b/packages/common/src/api/tan-query/users/useFollowing.ts @@ -48,7 +48,7 @@ export const useFollowing = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getFollowing({ + const { data = [] } = await sdk.users.getFollowing({ id: Id.parse(userId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/users/useMutedUsers.ts b/packages/common/src/api/tan-query/users/useMutedUsers.ts index 984932f7fc1..39fa4aec49d 100644 --- a/packages/common/src/api/tan-query/users/useMutedUsers.ts +++ b/packages/common/src/api/tan-query/users/useMutedUsers.ts @@ -36,7 +36,7 @@ export const useMutedUsers = ( queryFn: async () => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data } = await sdk.full.users.getMutedUsers({ + const { data } = await sdk.users.getMutedUsers({ id: Id.parse(currentUserId) }) const users = userMetadataListFromSDK(data) diff --git a/packages/common/src/api/tan-query/users/useMutualFollowers.ts b/packages/common/src/api/tan-query/users/useMutualFollowers.ts index e838ab1e3b6..c0be0e10e60 100644 --- a/packages/common/src/api/tan-query/users/useMutualFollowers.ts +++ b/packages/common/src/api/tan-query/users/useMutualFollowers.ts @@ -47,7 +47,7 @@ export const useMutualFollowers = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getMutualFollowers({ + const { data = [] } = await sdk.users.getMutualFollowers({ userId: OptionalId.parse(currentUserId), id: Id.parse(userId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/users/useRelatedArtists.ts b/packages/common/src/api/tan-query/users/useRelatedArtists.ts index ae70e43ee32..fb46a1f90ab 100644 --- a/packages/common/src/api/tan-query/users/useRelatedArtists.ts +++ b/packages/common/src/api/tan-query/users/useRelatedArtists.ts @@ -55,7 +55,7 @@ export const useRelatedArtists = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getRelatedUsers({ + const { data = [] } = await sdk.users.getRelatedUsers({ id: Id.parse(artistId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts b/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts index 7435d1c307d..893891cade8 100644 --- a/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts +++ b/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts @@ -51,7 +51,7 @@ export const useTopArtistsInGenre = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.users.getTopUsersInGenre({ + const { data } = await sdk.users.getTopUsersInGenre({ genre: [genre], limit: pageSize, offset: (pageParam as number) * pageSize diff --git a/packages/common/src/store/account/sagas.ts b/packages/common/src/store/account/sagas.ts index 59ebc370abb..beaef5b4241 100644 --- a/packages/common/src/store/account/sagas.ts +++ b/packages/common/src/store/account/sagas.ts @@ -66,7 +66,7 @@ function* handleFetchTrackCount() { try { const { data = [] } = yield* call( - [sdk.full.users, sdk.users.getTracksByUserHandle], + [sdk.users, sdk.users.getTracksByUserHandle], { handle, userId: Id.parse(currentUserId), diff --git a/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts b/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts index e35a778e566..8f9f16e0b9e 100644 --- a/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts +++ b/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts @@ -26,7 +26,7 @@ function* fetchPlaylistUpdatesWorker() { const existingUpdatesTotal = yield* select(selectPlaylistUpdatesTotal) const { data } = yield* call( - [sdk.full.notifications, sdk.full.notifications.getPlaylistUpdates], + [sdk.notifications, sdk.notifications.getPlaylistUpdates], { userId: Id.parse(currentUserId) } ) diff --git a/packages/common/src/store/purchase-content/sagas.ts b/packages/common/src/store/purchase-content/sagas.ts index e9e954b7845..f579d01f97f 100644 --- a/packages/common/src/store/purchase-content/sagas.ts +++ b/packages/common/src/store/purchase-content/sagas.ts @@ -598,15 +598,17 @@ function* collectEmailAfterPurchase({ return } - const { data: managers } = yield* call( - [sdk.full.users, sdk.full.users.getManagers], - { + const managersResponse = (yield* call(() => + sdk.users.getManagers({ id: Id.parse(sellerId), isApproved: true - } - ) + }) + )) as { data?: Array<{ manager: { id: string } }> } | undefined + const managers = managersResponse?.data - const grantees = managers?.map((m) => m.manager.id) + const grantees = managers?.map( + (m: { manager: { id: string } }) => m.manager.id + ) const { EMAIL_ENCRYPTION_UUID } = yield* getContext('env') yield* call([sdk.users, sdk.users.shareEmail], { diff --git a/packages/common/src/store/ui/search-users-modal/sagas.ts b/packages/common/src/store/ui/search-users-modal/sagas.ts index 2d00d8091d8..667460568d5 100644 --- a/packages/common/src/store/ui/search-users-modal/sagas.ts +++ b/packages/common/src/store/ui/search-users-modal/sagas.ts @@ -18,7 +18,7 @@ function* doSearchUsers(action: ReturnType) { const userList = yield* select(getUserList) try { const currentUserId = yield* call(queryCurrentUserId) - const { data } = yield* call([sdk.full.search, sdk.full.search.search], { + const { data } = yield* call([sdk.search, sdk.search.search], { query, limit, kind: SearchKind.USERS, diff --git a/packages/common/src/store/ui/share-modal/sagas.ts b/packages/common/src/store/ui/share-modal/sagas.ts index 265d80ccb1c..a2f2f161a09 100644 --- a/packages/common/src/store/ui/share-modal/sagas.ts +++ b/packages/common/src/store/ui/share-modal/sagas.ts @@ -40,7 +40,7 @@ function* handleRequestOpen(action: ShareModalRequestOpenAction) { let collection = yield* queryCollection(collectionId) if (!collection) { const { data = [] } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + [sdk.playlists, sdk.playlists.getPlaylist], { playlistId: Id.parse(collectionId) } @@ -57,11 +57,12 @@ function* handleRequestOpen(action: ShareModalRequestOpenAction) { let owner = yield* queryUser(collection.playlist_owner_id) if (!owner) { - const { data } = yield* call([sdk.full.users, sdk.full.users.getUser], { + const data = yield* call([sdk.users, sdk.users.getUser], { id: Id.parse(collection.playlist_owner_id) }) + const list = Array.isArray(data) ? data : data != null ? [data] : [] const [transformedUser] = transformAndCleanList( - data ?? [], + list as import('@audius/sdk').User[], userMetadataFromSDK ) if (transformedUser) { diff --git a/packages/create-audius-app/examples/react-hono/src/index.tsx b/packages/create-audius-app/examples/react-hono/src/index.tsx index 60c6d747d65..9abe61b0944 100644 --- a/packages/create-audius-app/examples/react-hono/src/index.tsx +++ b/packages/create-audius-app/examples/react-hono/src/index.tsx @@ -63,7 +63,7 @@ app.get( async (c) => { const audiusSdk = await getAudiusSdk() const { id, userId } = c.req.valid('query') - const { data } = await audiusSdk.full.users.getTracksByUser({ + const { data } = await audiusSdk.users.getTracksByUser({ id, userId }) diff --git a/packages/embed/src/util/BedtimeClient.js b/packages/embed/src/util/BedtimeClient.js index a450bdaf9ac..ec1a0caa3b4 100644 --- a/packages/embed/src/util/BedtimeClient.js +++ b/packages/embed/src/util/BedtimeClient.js @@ -76,20 +76,20 @@ const getFormattedCollectionResponse = (collection) => { } export const getTrack = async (id) => { - const res = await audiusSdk.full.tracks.getTrack({ + const res = await audiusSdk.tracks.getTrack({ trackId: encodeHashId(id) }) return res.data } export const getTrackWithHashId = async (hashId) => { - const res = await audiusSdk.full.tracks.getTrack({ trackId: hashId }) + const res = await audiusSdk.tracks.getTrack({ trackId: hashId }) return res.data } export const getTrackByPermalink = async (handle, slug) => { const permalink = `/${handle}/${slug}` - const res = await audiusSdk.full.tracks.getBulkTracks({ + const res = await audiusSdk.tracks.getBulkTracks({ permalink: [permalink] }) return res.data?.[0] || null diff --git a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts index 18c4eea2cf8..cdc9d8045d5 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts @@ -124,7 +124,7 @@ function* downloadCollectionAsync( const sdk = yield* getSDK() const { data = [] } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + [sdk.playlists, sdk.playlists.getPlaylist], { playlistId: Id.parse(collectionId), userId: OptionalId.parse(currentUserId) diff --git a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts index 172a2e2dcbc..6fc473431de 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts @@ -35,7 +35,7 @@ function* downloadCollection(action: CollectionAction) { const sdk = yield* getSDK() const { data = [] } = yield* call( - [sdk.playlists, sdk.full.playlists.getPlaylist], + [sdk.playlists, sdk.playlists.getPlaylist], { playlistId: Id.parse(collectionId), userId: OptionalId.parse(currentUserId) diff --git a/packages/sdk/src/sdk/api/comments/CommentsAPI.ts b/packages/sdk/src/sdk/api/comments/CommentsAPI.ts index 3909311123c..e590d26a862 100644 --- a/packages/sdk/src/sdk/api/comments/CommentsAPI.ts +++ b/packages/sdk/src/sdk/api/comments/CommentsAPI.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +// @ts-nocheck - Custom API overrides use different param/return types than generated base import snakecaseKeys from 'snakecase-keys' import { OverrideProperties } from 'type-fest' diff --git a/packages/sdk/src/sdk/api/developer-apps/DeveloperAppsApi.ts b/packages/sdk/src/sdk/api/developer-apps/DeveloperAppsApi.ts index dfbcb7052df..2ca52aa7f14 100644 --- a/packages/sdk/src/sdk/api/developer-apps/DeveloperAppsApi.ts +++ b/packages/sdk/src/sdk/api/developer-apps/DeveloperAppsApi.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +// @ts-nocheck - Custom API overrides use different param/return types than generated base import { generatePrivateKey, privateKeyToAddress } from 'viem/accounts' import { diff --git a/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES b/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES index aa6d267c67e..c67d9d2695f 100644 --- a/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES +++ b/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES @@ -1,17 +1,22 @@ .openapi-generator-ignore apis/ChallengesApi.ts +apis/CidDataApi.ts apis/CoinsApi.ts apis/CommentsApi.ts apis/DashboardWalletUsersApi.ts apis/DeveloperAppsApi.ts apis/EventsApi.ts apis/ExploreApi.ts +apis/NotificationsApi.ts apis/PlaylistsApi.ts apis/PrizesApi.ts +apis/ReactionsApi.ts apis/ResolveApi.ts apis/RewardsApi.ts +apis/SearchApi.ts apis/TipsApi.ts apis/TracksApi.ts +apis/TransactionsApi.ts apis/UsersApi.ts apis/WalletApi.ts apis/index.ts @@ -19,9 +24,30 @@ index.ts models/Access.ts models/AccessGate.ts models/AccessInfoResponse.ts +models/AccountCollection.ts +models/AccountCollectionUser.ts +models/AccountFull.ts models/Activity.ts +models/ActivityFull.ts models/AlbumBacklink.ts models/AlbumsResponse.ts +models/AnnouncementNotification.ts +models/AnnouncementNotificationAction.ts +models/AnnouncementNotificationActionData.ts +models/ApproveManagerRequestNotification.ts +models/ApproveManagerRequestNotificationAction.ts +models/ApproveManagerRequestNotificationActionData.ts +models/ArtistRemixContestEndedNotification.ts +models/ArtistRemixContestEndedNotificationAction.ts +models/ArtistRemixContestEndedNotificationActionData.ts +models/ArtistRemixContestEndingSoonNotification.ts +models/ArtistRemixContestEndingSoonNotificationAction.ts +models/ArtistRemixContestEndingSoonNotificationActionData.ts +models/ArtistRemixContestSubmissionsNotification.ts +models/ArtistRemixContestSubmissionsNotificationAction.ts +models/ArtistRemixContestSubmissionsNotificationActionData.ts +models/Attestation.ts +models/AttestationReponse.ts models/AuthorizedApp.ts models/AuthorizedApps.ts models/BalanceHistoryDataPoint.ts @@ -30,9 +56,17 @@ models/BestSellingItem.ts models/BestSellingResponse.ts models/BlobInfo.ts models/ChallengeResponse.ts +models/ChallengeRewardNotification.ts +models/ChallengeRewardNotificationAction.ts +models/ChallengeRewardNotificationActionData.ts +models/CidData.ts +models/CidDataResponse.ts models/ClaimRewardsRequest.ts models/ClaimRewardsResponse.ts models/ClaimRewardsResponseDataInner.ts +models/ClaimableRewardNotification.ts +models/ClaimableRewardNotificationAction.ts +models/ClaimableRewardNotificationActionData.ts models/ClaimedPrize.ts models/ClaimedPrizesResponse.ts models/Coin.ts @@ -53,21 +87,57 @@ models/CoinsVolumeLeadersResponseDataInner.ts models/Collectibles.ts models/CollectiblesResponse.ts models/CollectionActivity.ts +models/CollectionActivityFullWithoutTracks.ts +models/CollectionLibraryResponseFull.ts models/Comment.ts models/CommentMention.ts +models/CommentMentionNotification.ts +models/CommentMentionNotificationAction.ts +models/CommentMentionNotificationActionData.ts +models/CommentNotification.ts +models/CommentNotificationAction.ts +models/CommentNotificationActionData.ts models/CommentNotificationSetting.ts +models/CommentReactionNotification.ts +models/CommentReactionNotificationAction.ts +models/CommentReactionNotificationActionData.ts models/CommentRepliesResponse.ts models/CommentResponse.ts +models/CommentThreadNotification.ts +models/CommentThreadNotificationAction.ts +models/CommentThreadNotificationActionData.ts models/ConnectedWallets.ts models/ConnectedWalletsResponse.ts +models/CosignNotification.ts +models/CosignNotificationAction.ts +models/CosignNotificationActionData.ts +models/CoverArt.ts models/CoverPhoto.ts +models/CoverPhotoFull.ts models/CreateCoinRequest.ts models/CreateCoinResponse.ts models/CreateCoinResponseData.ts +models/CreateComment201Response.ts +models/CreateCommentRequest.ts +models/CreateDeveloperAppRequest.ts +models/CreateDeveloperAppRequestAppSignature.ts +models/CreateNotification.ts +models/CreateNotificationAction.ts +models/CreateNotificationActionData.ts +models/CreatePlaylist201Response.ts +models/CreatePlaylistNotificationActionData.ts +models/CreatePlaylistRequest.ts +models/CreatePlaylistRequestPlaylistContentsInner.ts models/CreateRewardCodeRequest.ts models/CreateRewardCodeResponse.ts +models/CreateTrack201Response.ts +models/CreateTrackNotificationActionData.ts +models/CreateTrackRequest.ts +models/CreateUser201Response.ts +models/CreateUserRequest.ts models/DashboardWalletUser.ts models/DashboardWalletUsersResponse.ts +models/DataAndType.ts models/DecodedUserToken.ts models/DeveloperApp.ts models/DeveloperAppResponse.ts @@ -81,45 +151,122 @@ models/ExtendedPaymentSplit.ts models/ExtendedPurchaseGate.ts models/ExtendedTokenGate.ts models/ExtendedUsdcGate.ts +models/FanRemixContestEndedNotification.ts +models/FanRemixContestEndedNotificationAction.ts +models/FanRemixContestEndedNotificationActionData.ts +models/FanRemixContestEndingSoonNotification.ts +models/FanRemixContestEndingSoonNotificationAction.ts +models/FanRemixContestEndingSoonNotificationActionData.ts +models/FanRemixContestStartedNotification.ts +models/FanRemixContestStartedNotificationAction.ts +models/FanRemixContestStartedNotificationActionData.ts +models/FanRemixContestWinnersSelectedNotification.ts +models/FanRemixContestWinnersSelectedNotificationAction.ts +models/FanRemixContestWinnersSelectedNotificationActionData.ts models/Favorite.ts models/FavoritesResponse.ts +models/FieldVisibility.ts models/FollowGate.ts +models/FollowNotification.ts +models/FollowNotificationAction.ts +models/FollowNotificationActionData.ts models/FollowersResponse.ts models/FollowingResponse.ts +models/FullBulkSubscribersResponse.ts +models/FullGetSupporter.ts +models/FullGetSupporting.ts +models/FullRemix.ts +models/FullRemixParent.ts +models/FullReposts.ts +models/FullSupporter.ts +models/FullSupporting.ts +models/FullTracksResponse.ts +models/FullTrendingPlaylistsResponse.ts models/GetChallenges.ts models/GetSupportedUsers.ts models/GetSupporters.ts models/GetTipsResponse.ts +models/Grant.ts models/HistoryResponse.ts models/ListenCount.ts +models/ListenStreakReminderNotification.ts +models/ListenStreakReminderNotificationAction.ts +models/ListenStreakReminderNotificationActionData.ts +models/ManagedUser.ts +models/ManagedUsersResponse.ts +models/ManagersResponse.ts models/MediaLink.ts +models/MilestoneNotification.ts +models/MilestoneNotificationAction.ts +models/MilestoneNotificationActionData.ts models/MonthlyAggregatePlay.ts models/MutualFollowersResponse.ts models/NftCollection.ts models/NftGate.ts +models/Notification.ts +models/Notifications.ts +models/NotificationsResponse.ts models/Playlist.ts models/PlaylistAddedTimestamp.ts models/PlaylistArtwork.ts +models/PlaylistArtworkFull.ts +models/PlaylistFeedItem.ts +models/PlaylistFull.ts +models/PlaylistFullWithoutTracks.ts +models/PlaylistLibrary.ts +models/PlaylistMilestoneNotificationActionData.ts models/PlaylistResponse.ts models/PlaylistSearchResult.ts models/PlaylistTracksResponse.ts +models/PlaylistUpdate.ts +models/PlaylistUpdates.ts +models/PlaylistUpdatesResponse.ts models/PlaylistsResponse.ts models/PrizeClaimRequest.ts models/PrizeClaimResponse.ts models/PrizePublic.ts models/PrizesResponse.ts models/ProfilePicture.ts +models/ProfilePictureFull.ts +models/Purchase.ts +models/PurchaseSplit.ts +models/PurchasersCountResponse.ts models/PurchasersResponse.ts +models/PurchasesCountResponse.ts +models/PurchasesResponse.ts +models/Reaction.ts +models/ReactionNotification.ts +models/ReactionNotificationAction.ts +models/ReactionNotificationActionData.ts +models/Reactions.ts +models/ReceiveTipNotification.ts +models/ReceiveTipNotificationAction.ts +models/ReceiveTipNotificationActionData.ts +models/RecordTrackDownloadRequest.ts models/RedeemAmountResponse.ts models/RelatedArtistResponse.ts +models/RemixNotification.ts +models/RemixNotificationAction.ts +models/RemixNotificationActionData.ts models/RemixParent.ts +models/RemixablesResponse.ts models/RemixedTrackAggregate.ts +models/RemixersCountResponse.ts models/RemixersResponse.ts models/RemixesResponse.ts models/RemixingResponse.ts models/ReplyComment.ts models/Repost.ts +models/RepostNotification.ts +models/RepostNotificationAction.ts +models/RepostNotificationActionData.ts +models/RepostOfRepostNotification.ts +models/RepostOfRepostNotificationAction.ts +models/RepostOfRepostNotificationActionData.ts models/Reposts.ts +models/RequestManagerNotification.ts +models/RequestManagerNotificationAction.ts +models/RequestManagerNotificationActionData.ts models/RewardCodeErrorResponse.ts models/RewardCodeResponse.ts models/SaleJson.ts @@ -127,56 +274,132 @@ models/SalesAggregate.ts models/SalesAggregateResponse.ts models/SalesJsonContent.ts models/SalesJsonResponse.ts +models/SaveNotification.ts +models/SaveNotificationAction.ts +models/SaveNotificationActionData.ts +models/SaveOfRepostNotification.ts +models/SaveOfRepostNotificationAction.ts +models/SaveOfRepostNotificationActionData.ts +models/SearchAutocompleteResponse.ts +models/SearchFullResponse.ts +models/SearchModel.ts +models/SearchPlaylistFull.ts +models/SearchTrackFull.ts +models/SendTipNotification.ts +models/SendTipNotificationAction.ts +models/SendTipNotificationActionData.ts models/Stem.ts +models/StemParent.ts models/StemsResponse.ts models/StreamUrlResponse.ts models/SubscribersResponse.ts models/Supporter.ts +models/SupporterDethronedNotification.ts +models/SupporterDethronedNotificationAction.ts +models/SupporterDethronedNotificationActionData.ts +models/SupporterRankUpNotification.ts +models/SupporterRankUpNotificationAction.ts +models/SupporterRankUpNotificationActionData.ts models/Supporting.ts models/TagsResponse.ts +models/TastemakerNotification.ts +models/TastemakerNotificationAction.ts +models/TastemakerNotificationActionData.ts +models/TierChangeNotification.ts +models/TierChangeNotificationAction.ts +models/TierChangeNotificationActionData.ts models/Tip.ts models/TipGate.ts models/TokenGate.ts +models/TopGenreUsersResponseFull.ts models/TopListener.ts +models/TopUsersResponseFull.ts models/Track.ts models/TrackAccessInfo.ts models/TrackActivity.ts +models/TrackActivityFull.ts +models/TrackAddedToPlaylistNotification.ts +models/TrackAddedToPlaylistNotificationAction.ts +models/TrackAddedToPlaylistNotificationActionData.ts +models/TrackAddedToPurchasedAlbumNotification.ts +models/TrackAddedToPurchasedAlbumNotificationAction.ts +models/TrackAddedToPurchasedAlbumNotificationActionData.ts models/TrackArtwork.ts +models/TrackArtworkFull.ts models/TrackCommentCountResponse.ts models/TrackCommentNotificationResponse.ts models/TrackCommentsResponse.ts models/TrackElement.ts models/TrackFavoritesResponse.ts +models/TrackFeedItem.ts +models/TrackFull.ts models/TrackId.ts models/TrackInspect.ts models/TrackInspectList.ts +models/TrackLibraryResponseFull.ts +models/TrackMilestoneNotificationActionData.ts models/TrackRepostsResponse.ts models/TrackResponse.ts models/TrackSearch.ts +models/TrackSegment.ts models/TracksCountResponse.ts models/TracksResponse.ts +models/TransactionDetails.ts +models/TransactionHistoryCountResponse.ts +models/TransactionHistoryResponse.ts models/TrendingIdsResponse.ts +models/TrendingNotification.ts +models/TrendingNotificationAction.ts +models/TrendingNotificationActionData.ts +models/TrendingPlaylistNotification.ts +models/TrendingPlaylistNotificationAction.ts +models/TrendingPlaylistNotificationActionData.ts models/TrendingPlaylistsResponse.ts models/TrendingTimesIds.ts +models/TrendingUndergroundNotification.ts +models/TrendingUndergroundNotificationAction.ts +models/TrendingUndergroundNotificationActionData.ts models/UnclaimedIdResponse.ts models/UndisbursedChallenge.ts models/UndisbursedChallenges.ts models/UpdateCoinRequest.ts models/UpdateCoinResponse.ts +models/UpdateCommentRequest.ts +models/UpdateDeveloperAppRequest.ts +models/UpdatePlaylistRequest.ts +models/UpdatePlaylistRequestPlaylistContentsInner.ts +models/UpdateTrackRequest.ts +models/UpdateUserRequest.ts +models/UrlWithMirrors.ts +models/UsdcPurchaseBuyerNotification.ts +models/UsdcPurchaseBuyerNotificationAction.ts +models/UsdcPurchaseBuyerNotificationActionData.ts +models/UsdcPurchaseSellerNotification.ts +models/UsdcPurchaseSellerNotificationAction.ts +models/UsdcPurchaseSellerNotificationActionData.ts models/User.ts +models/UserAccountResponseFull.ts models/UserCoin.ts models/UserCoinAccount.ts models/UserCoinResponse.ts models/UserCoinWithAccounts.ts models/UserCoinsResponse.ts models/UserCommentsResponse.ts +models/UserFeedItem.ts +models/UserFeedResponse.ts +models/UserFull.ts +models/UserFullArtistCoinBadge.ts models/UserIdAddress.ts models/UserIdsAddressesResponse.ts +models/UserManager.ts +models/UserMilestoneNotificationActionData.ts models/UserResponse.ts models/UserSearch.ts +models/UserSubscribers.ts models/UserTrackListenCountsResponse.ts models/UserTracksRemixedResponse.ts models/UsersResponse.ts models/VerifyToken.ts +models/VersionMetadata.ts models/index.ts runtime.ts diff --git a/packages/sdk/src/sdk/api/generated/default/apis/ChallengesApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/ChallengesApi.ts index 353c0efba58..b52813a72c1 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/ChallengesApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/ChallengesApi.ts @@ -16,13 +16,23 @@ import * as runtime from '../runtime'; import type { + AttestationReponse, UndisbursedChallenges, } from '../models'; import { + AttestationReponseFromJSON, + AttestationReponseToJSON, UndisbursedChallengesFromJSON, UndisbursedChallengesToJSON, } from '../models'; +export interface GetChallengeAttestationRequest { + challengeId: string; + oracle: string; + specifier: string; + userId: string; +} + export interface GetUndisbursedChallengesRequest { offset?: number; limit?: number; @@ -44,6 +54,61 @@ export interface GetUndisbursedChallengesForUserRequest { */ export class ChallengesApi extends runtime.BaseAPI { + /** + * @hidden + * Produces an attestation that a given user has completed a challenge, or errors. + */ + async getChallengeAttestationRaw(params: GetChallengeAttestationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.challengeId === null || params.challengeId === undefined) { + throw new runtime.RequiredError('challengeId','Required parameter params.challengeId was null or undefined when calling getChallengeAttestation.'); + } + + if (params.oracle === null || params.oracle === undefined) { + throw new runtime.RequiredError('oracle','Required parameter params.oracle was null or undefined when calling getChallengeAttestation.'); + } + + if (params.specifier === null || params.specifier === undefined) { + throw new runtime.RequiredError('specifier','Required parameter params.specifier was null or undefined when calling getChallengeAttestation.'); + } + + if (params.userId === null || params.userId === undefined) { + throw new runtime.RequiredError('userId','Required parameter params.userId was null or undefined when calling getChallengeAttestation.'); + } + + const queryParameters: any = {}; + + if (params.oracle !== undefined) { + queryParameters['oracle'] = params.oracle; + } + + if (params.specifier !== undefined) { + queryParameters['specifier'] = params.specifier; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/challenges/{challenge_id}/attest`.replace(`{${"challenge_id"}}`, encodeURIComponent(String(params.challengeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AttestationReponseFromJSON(jsonValue)); + } + + /** + * Produces an attestation that a given user has completed a challenge, or errors. + */ + async getChallengeAttestation(params: GetChallengeAttestationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getChallengeAttestationRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Get all undisbursed challenges diff --git a/packages/sdk/src/sdk/api/generated/default/apis/CidDataApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/CidDataApi.ts new file mode 100644 index 00000000000..5352952cde6 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/apis/CidDataApi.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +// @ts-nocheck +/* eslint-disable */ +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CidDataResponse, +} from '../models'; +import { + CidDataResponseFromJSON, + CidDataResponseToJSON, +} from '../models'; + +export interface GetMetadataRequest { + metadataId: string; +} + +/** + * + */ +export class CidDataApi extends runtime.BaseAPI { + + /** + * @hidden + * Get a metadata by CID + */ + async getMetadataRaw(params: GetMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.metadataId === null || params.metadataId === undefined) { + throw new runtime.RequiredError('metadataId','Required parameter params.metadataId was null or undefined when calling getMetadata.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/cid_data/{metadata_id}`.replace(`{${"metadata_id"}}`, encodeURIComponent(String(params.metadataId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CidDataResponseFromJSON(jsonValue)); + } + + /** + * Get a metadata by CID + */ + async getMetadata(params: GetMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMetadataRaw(params, initOverrides); + return await response.value(); + } + +} diff --git a/packages/sdk/src/sdk/api/generated/default/apis/CommentsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/CommentsApi.ts index 1bf63a31e2d..2dca45350e8 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/CommentsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/CommentsApi.ts @@ -18,17 +18,34 @@ import * as runtime from '../runtime'; import type { CommentRepliesResponse, CommentResponse, + CreateComment201Response, + CreateCommentRequest, UnclaimedIdResponse, + UpdateCommentRequest, } from '../models'; import { CommentRepliesResponseFromJSON, CommentRepliesResponseToJSON, CommentResponseFromJSON, CommentResponseToJSON, + CreateComment201ResponseFromJSON, + CreateComment201ResponseToJSON, + CreateCommentRequestFromJSON, + CreateCommentRequestToJSON, UnclaimedIdResponseFromJSON, UnclaimedIdResponseToJSON, + UpdateCommentRequestFromJSON, + UpdateCommentRequestToJSON, } from '../models'; +export interface CreateCommentOperationRequest { + createCommentRequest: CreateCommentRequest; +} + +export interface DeleteCommentRequest { + commentId: string; +} + export interface GetCommentRequest { commentId: string; } @@ -40,11 +57,101 @@ export interface GetCommentRepliesRequest { userId?: string; } +export interface PinCommentRequest { + commentId: string; +} + +export interface ReactToCommentRequest { + commentId: string; +} + +export interface ReportCommentRequest { + commentId: string; +} + +export interface UnpinCommentRequest { + commentId: string; +} + +export interface UnreactToCommentRequest { + commentId: string; +} + +export interface UpdateCommentOperationRequest { + commentId: string; + updateCommentRequest: UpdateCommentRequest; +} + /** * */ export class CommentsApi extends runtime.BaseAPI { + /** + * @hidden + * Creates a new comment + */ + async createCommentRaw(params: CreateCommentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.createCommentRequest === null || params.createCommentRequest === undefined) { + throw new runtime.RequiredError('createCommentRequest','Required parameter params.createCommentRequest was null or undefined when calling createComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/comments`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateCommentRequestToJSON(params.createCommentRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Creates a new comment + */ + async createComment(params: CreateCommentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createCommentRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Deletes a comment + */ + async deleteCommentRaw(params: DeleteCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.commentId === null || params.commentId === undefined) { + throw new runtime.RequiredError('commentId','Required parameter params.commentId was null or undefined when calling deleteComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/comments/{comment_id}`.replace(`{${"comment_id"}}`, encodeURIComponent(String(params.commentId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Deletes a comment + */ + async deleteComment(params: DeleteCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteCommentRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets a comment by ID @@ -146,4 +253,197 @@ export class CommentsApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Pin a comment + */ + async pinCommentRaw(params: PinCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.commentId === null || params.commentId === undefined) { + throw new runtime.RequiredError('commentId','Required parameter params.commentId was null or undefined when calling pinComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/comments/{comment_id}/pin`.replace(`{${"comment_id"}}`, encodeURIComponent(String(params.commentId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Pin a comment + */ + async pinComment(params: PinCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.pinCommentRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * React to a comment + */ + async reactToCommentRaw(params: ReactToCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.commentId === null || params.commentId === undefined) { + throw new runtime.RequiredError('commentId','Required parameter params.commentId was null or undefined when calling reactToComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/comments/{comment_id}/react`.replace(`{${"comment_id"}}`, encodeURIComponent(String(params.commentId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * React to a comment + */ + async reactToComment(params: ReactToCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.reactToCommentRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Report a comment + */ + async reportCommentRaw(params: ReportCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.commentId === null || params.commentId === undefined) { + throw new runtime.RequiredError('commentId','Required parameter params.commentId was null or undefined when calling reportComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/comments/{comment_id}/report`.replace(`{${"comment_id"}}`, encodeURIComponent(String(params.commentId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Report a comment + */ + async reportComment(params: ReportCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.reportCommentRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Unpin a comment + */ + async unpinCommentRaw(params: UnpinCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.commentId === null || params.commentId === undefined) { + throw new runtime.RequiredError('commentId','Required parameter params.commentId was null or undefined when calling unpinComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/comments/{comment_id}/pin`.replace(`{${"comment_id"}}`, encodeURIComponent(String(params.commentId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Unpin a comment + */ + async unpinComment(params: UnpinCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unpinCommentRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Unreact to a comment + */ + async unreactToCommentRaw(params: UnreactToCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.commentId === null || params.commentId === undefined) { + throw new runtime.RequiredError('commentId','Required parameter params.commentId was null or undefined when calling unreactToComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/comments/{comment_id}/react`.replace(`{${"comment_id"}}`, encodeURIComponent(String(params.commentId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Unreact to a comment + */ + async unreactToComment(params: UnreactToCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unreactToCommentRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Updates a comment + */ + async updateCommentRaw(params: UpdateCommentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.commentId === null || params.commentId === undefined) { + throw new runtime.RequiredError('commentId','Required parameter params.commentId was null or undefined when calling updateComment.'); + } + + if (params.updateCommentRequest === null || params.updateCommentRequest === undefined) { + throw new runtime.RequiredError('updateCommentRequest','Required parameter params.updateCommentRequest was null or undefined when calling updateComment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/comments/{comment_id}`.replace(`{${"comment_id"}}`, encodeURIComponent(String(params.commentId))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateCommentRequestToJSON(params.updateCommentRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Updates a comment + */ + async updateComment(params: UpdateCommentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateCommentRaw(params, initOverrides); + return await response.value(); + } + } diff --git a/packages/sdk/src/sdk/api/generated/default/apis/DeveloperAppsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/DeveloperAppsApi.ts index 30a0d4bae89..ec6560060b9 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/DeveloperAppsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/DeveloperAppsApi.ts @@ -16,17 +16,46 @@ import * as runtime from '../runtime'; import type { + CreateComment201Response, + CreateDeveloperAppRequest, + DeveloperApp, DeveloperAppResponse, + UpdateDeveloperAppRequest, } from '../models'; import { + CreateComment201ResponseFromJSON, + CreateComment201ResponseToJSON, + CreateDeveloperAppRequestFromJSON, + CreateDeveloperAppRequestToJSON, + DeveloperAppFromJSON, + DeveloperAppToJSON, DeveloperAppResponseFromJSON, DeveloperAppResponseToJSON, + UpdateDeveloperAppRequestFromJSON, + UpdateDeveloperAppRequestToJSON, } from '../models'; +export interface CreateDeveloperAppOperationRequest { + createDeveloperAppRequest: CreateDeveloperAppRequest; +} + +export interface DeleteDeveloperAppRequest { + address: string; +} + export interface GetDeveloperAppRequest { address: string; } +export interface GetDeveloperAppByAddressRequest { + address: string; +} + +export interface UpdateDeveloperAppOperationRequest { + address: string; + updateDeveloperAppRequest: UpdateDeveloperAppRequest; +} + /** * */ @@ -34,9 +63,74 @@ export class DeveloperAppsApi extends runtime.BaseAPI { /** * @hidden - * Gets developer app matching given address (API key) + * Creates a new developer app + */ + async createDeveloperAppRaw(params: CreateDeveloperAppOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.createDeveloperAppRequest === null || params.createDeveloperAppRequest === undefined) { + throw new runtime.RequiredError('createDeveloperAppRequest','Required parameter params.createDeveloperAppRequest was null or undefined when calling createDeveloperApp.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/developer-apps`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateDeveloperAppRequestToJSON(params.createDeveloperAppRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Creates a new developer app + */ + async createDeveloperApp(params: CreateDeveloperAppOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createDeveloperAppRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Deletes a developer app */ - async getDeveloperAppRaw(params: GetDeveloperAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteDeveloperAppRaw(params: DeleteDeveloperAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.address === null || params.address === undefined) { + throw new runtime.RequiredError('address','Required parameter params.address was null or undefined when calling deleteDeveloperApp.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/developer-apps/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(params.address))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Deletes a developer app + */ + async deleteDeveloperApp(params: DeleteDeveloperAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteDeveloperAppRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a developer app by address + */ + async getDeveloperAppRaw(params: GetDeveloperAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.address === null || params.address === undefined) { throw new runtime.RequiredError('address','Required parameter params.address was null or undefined when calling getDeveloperApp.'); } @@ -45,6 +139,37 @@ export class DeveloperAppsApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + const response = await this.request({ + path: `/developer-apps/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(params.address))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeveloperAppFromJSON(jsonValue)); + } + + /** + * Gets a developer app by address + */ + async getDeveloperApp(params: GetDeveloperAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDeveloperAppRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets developer app matching given address (API key) + */ + async getDeveloperAppByAddressRaw(params: GetDeveloperAppByAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.address === null || params.address === undefined) { + throw new runtime.RequiredError('address','Required parameter params.address was null or undefined when calling getDeveloperAppByAddress.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + const response = await this.request({ path: `/developer_apps/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(params.address))), method: 'GET', @@ -58,8 +183,46 @@ export class DeveloperAppsApi extends runtime.BaseAPI { /** * Gets developer app matching given address (API key) */ - async getDeveloperApp(params: GetDeveloperAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDeveloperAppRaw(params, initOverrides); + async getDeveloperAppByAddress(params: GetDeveloperAppByAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDeveloperAppByAddressRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Updates an existing developer app + */ + async updateDeveloperAppRaw(params: UpdateDeveloperAppOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.address === null || params.address === undefined) { + throw new runtime.RequiredError('address','Required parameter params.address was null or undefined when calling updateDeveloperApp.'); + } + + if (params.updateDeveloperAppRequest === null || params.updateDeveloperAppRequest === undefined) { + throw new runtime.RequiredError('updateDeveloperAppRequest','Required parameter params.updateDeveloperAppRequest was null or undefined when calling updateDeveloperApp.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/developer-apps/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(params.address))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateDeveloperAppRequestToJSON(params.updateDeveloperAppRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Updates an existing developer app + */ + async updateDeveloperApp(params: UpdateDeveloperAppOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateDeveloperAppRaw(params, initOverrides); return await response.value(); } diff --git a/packages/sdk/src/sdk/api/generated/default/apis/NotificationsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/NotificationsApi.ts new file mode 100644 index 00000000000..3b83e2ce263 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/apis/NotificationsApi.ts @@ -0,0 +1,174 @@ +/* tslint:disable */ +// @ts-nocheck +/* eslint-disable */ +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + NotificationsResponse, + PlaylistUpdatesResponse, +} from '../models'; +import { + NotificationsResponseFromJSON, + NotificationsResponseToJSON, + PlaylistUpdatesResponseFromJSON, + PlaylistUpdatesResponseToJSON, +} from '../models'; + +export interface GetNotificationsRequest { + userId: string; + timestamp?: number; + groupId?: string; + limit?: number; + types?: Array; +} + +export interface GetPlaylistUpdatesRequest { + userId: string; +} + +/** + * + */ +export class NotificationsApi extends runtime.BaseAPI { + + /** + * @hidden + * Get notifications for user ID + */ + async getNotificationsRaw(params: GetNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.userId === null || params.userId === undefined) { + throw new runtime.RequiredError('userId','Required parameter params.userId was null or undefined when calling getNotifications.'); + } + + const queryParameters: any = {}; + + if (params.timestamp !== undefined) { + queryParameters['timestamp'] = params.timestamp; + } + + if (params.groupId !== undefined) { + queryParameters['group_id'] = params.groupId; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.types) { + queryParameters['types'] = params.types; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/notifications/{user_id}`.replace(`{${"user_id"}}`, encodeURIComponent(String(params.userId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationsResponseFromJSON(jsonValue)); + } + + /** + * Get notifications for user ID + */ + async getNotifications(params: GetNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getNotificationsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get playlists the user has saved that have been updated for user ID + */ + async getPlaylistUpdatesRaw(params: GetPlaylistUpdatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.userId === null || params.userId === undefined) { + throw new runtime.RequiredError('userId','Required parameter params.userId was null or undefined when calling getPlaylistUpdates.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/notifications/{user_id}/playlist_updates`.replace(`{${"user_id"}}`, encodeURIComponent(String(params.userId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlaylistUpdatesResponseFromJSON(jsonValue)); + } + + /** + * Get playlists the user has saved that have been updated for user ID + */ + async getPlaylistUpdates(params: GetPlaylistUpdatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getPlaylistUpdatesRaw(params, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const GetNotificationsTypesEnum = { + Announcement: 'announcement', + Follow: 'follow', + Repost: 'repost', + Save: 'save', + Remix: 'remix', + Cosign: 'cosign', + Create: 'create', + TipReceive: 'tip_receive', + TipSend: 'tip_send', + ChallengeReward: 'challenge_reward', + RepostOfRepost: 'repost_of_repost', + SaveOfRepost: 'save_of_repost', + Tastemaker: 'tastemaker', + Reaction: 'reaction', + SupporterDethroned: 'supporter_dethroned', + SupporterRankUp: 'supporter_rank_up', + SupportingRankUp: 'supporting_rank_up', + Milestone: 'milestone', + TrackMilestone: 'track_milestone', + TrackAddedToPlaylist: 'track_added_to_playlist', + PlaylistMilestone: 'playlist_milestone', + TierChange: 'tier_change', + Trending: 'trending', + TrendingPlaylist: 'trending_playlist', + TrendingUnderground: 'trending_underground', + UsdcPurchaseBuyer: 'usdc_purchase_buyer', + UsdcPurchaseSeller: 'usdc_purchase_seller', + TrackAddedToPurchasedAlbum: 'track_added_to_purchased_album', + RequestManager: 'request_manager', + ApproveManagerRequest: 'approve_manager_request', + ClaimableReward: 'claimable_reward', + Comment: 'comment', + CommentThread: 'comment_thread', + CommentMention: 'comment_mention', + CommentReaction: 'comment_reaction', + ListenStreakReminder: 'listen_streak_reminder', + FanRemixContestStarted: 'fan_remix_contest_started', + FanRemixContestEnded: 'fan_remix_contest_ended', + FanRemixContestEndingSoon: 'fan_remix_contest_ending_soon', + FanRemixContestWinnersSelected: 'fan_remix_contest_winners_selected', + ArtistRemixContestEnded: 'artist_remix_contest_ended', + ArtistRemixContestEndingSoon: 'artist_remix_contest_ending_soon', + ArtistRemixContestSubmissions: 'artist_remix_contest_submissions' +} as const; +export type GetNotificationsTypesEnum = typeof GetNotificationsTypesEnum[keyof typeof GetNotificationsTypesEnum]; diff --git a/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts index cb10590b0a6..f38027b9155 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts @@ -17,14 +17,27 @@ import * as runtime from '../runtime'; import type { AccessInfoResponse, + CreateComment201Response, + CreatePlaylist201Response, + CreatePlaylistRequest, + FullTrendingPlaylistsResponse, PlaylistResponse, PlaylistSearchResult, PlaylistTracksResponse, TrendingPlaylistsResponse, + UpdatePlaylistRequest, } from '../models'; import { AccessInfoResponseFromJSON, AccessInfoResponseToJSON, + CreateComment201ResponseFromJSON, + CreateComment201ResponseToJSON, + CreatePlaylist201ResponseFromJSON, + CreatePlaylist201ResponseToJSON, + CreatePlaylistRequestFromJSON, + CreatePlaylistRequestToJSON, + FullTrendingPlaylistsResponseFromJSON, + FullTrendingPlaylistsResponseToJSON, PlaylistResponseFromJSON, PlaylistResponseToJSON, PlaylistSearchResultFromJSON, @@ -33,8 +46,22 @@ import { PlaylistTracksResponseToJSON, TrendingPlaylistsResponseFromJSON, TrendingPlaylistsResponseToJSON, + UpdatePlaylistRequestFromJSON, + UpdatePlaylistRequestToJSON, } from '../models'; +export interface CreatePlaylistOperationRequest { + createPlaylistRequest: CreatePlaylistRequest; +} + +export interface DeletePlaylistRequest { + playlistId: string; +} + +export interface FavoritePlaylistRequest { + playlistId: string; +} + export interface GetBulkPlaylistsRequest { userId?: string; id?: Array; @@ -70,6 +97,18 @@ export interface GetTrendingPlaylistsRequest { omitTracks?: boolean; } +export interface GetTrendingPlaylistsWithVersionRequest { + version: string; + offset?: number; + limit?: number; + userId?: string; + time?: GetTrendingPlaylistsWithVersionTimeEnum; +} + +export interface RepostPlaylistRequest { + playlistId: string; +} + export interface SearchPlaylistsRequest { offset?: number; limit?: number; @@ -81,11 +120,124 @@ export interface SearchPlaylistsRequest { hasDownloads?: string; } +export interface SharePlaylistRequest { + playlistId: string; +} + +export interface UnfavoritePlaylistRequest { + playlistId: string; +} + +export interface UnrepostPlaylistRequest { + playlistId: string; +} + +export interface UpdatePlaylistOperationRequest { + playlistId: string; + updatePlaylistRequest: UpdatePlaylistRequest; +} + /** * */ export class PlaylistsApi extends runtime.BaseAPI { + /** + * @hidden + * Creates a new playlist or album + */ + async createPlaylistRaw(params: CreatePlaylistOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.createPlaylistRequest === null || params.createPlaylistRequest === undefined) { + throw new runtime.RequiredError('createPlaylistRequest','Required parameter params.createPlaylistRequest was null or undefined when calling createPlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/playlists`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreatePlaylistRequestToJSON(params.createPlaylistRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreatePlaylist201ResponseFromJSON(jsonValue)); + } + + /** + * Creates a new playlist or album + */ + async createPlaylist(params: CreatePlaylistOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createPlaylistRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Deletes a playlist or album + */ + async deletePlaylistRaw(params: DeletePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.playlistId === null || params.playlistId === undefined) { + throw new runtime.RequiredError('playlistId','Required parameter params.playlistId was null or undefined when calling deletePlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/playlists/{playlist_id}`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Deletes a playlist or album + */ + async deletePlaylist(params: DeletePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deletePlaylistRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Favorite a playlist + */ + async favoritePlaylistRaw(params: FavoritePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.playlistId === null || params.playlistId === undefined) { + throw new runtime.RequiredError('playlistId','Required parameter params.playlistId was null or undefined when calling favoritePlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/playlists/{playlist_id}/favorites`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Favorite a playlist + */ + async favoritePlaylist(params: FavoritePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.favoritePlaylistRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets a list of playlists by ID @@ -316,6 +468,84 @@ export class PlaylistsApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Returns trending playlists for a time period based on the given trending version + */ + async getTrendingPlaylistsWithVersionRaw(params: GetTrendingPlaylistsWithVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.version === null || params.version === undefined) { + throw new runtime.RequiredError('version','Required parameter params.version was null or undefined when calling getTrendingPlaylistsWithVersion.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.time !== undefined) { + queryParameters['time'] = params.time; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/playlists/trending/{version}`.replace(`{${"version"}}`, encodeURIComponent(String(params.version))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FullTrendingPlaylistsResponseFromJSON(jsonValue)); + } + + /** + * Returns trending playlists for a time period based on the given trending version + */ + async getTrendingPlaylistsWithVersion(params: GetTrendingPlaylistsWithVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrendingPlaylistsWithVersionRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Repost a playlist + */ + async repostPlaylistRaw(params: RepostPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.playlistId === null || params.playlistId === undefined) { + throw new runtime.RequiredError('playlistId','Required parameter params.playlistId was null or undefined when calling repostPlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/playlists/{playlist_id}/reposts`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Repost a playlist + */ + async repostPlaylist(params: RepostPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.repostPlaylistRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Search for a playlist @@ -375,6 +605,137 @@ export class PlaylistsApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Record a playlist share event + */ + async sharePlaylistRaw(params: SharePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.playlistId === null || params.playlistId === undefined) { + throw new runtime.RequiredError('playlistId','Required parameter params.playlistId was null or undefined when calling sharePlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/playlists/{playlist_id}/shares`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Record a playlist share event + */ + async sharePlaylist(params: SharePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sharePlaylistRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Unfavorite a playlist + */ + async unfavoritePlaylistRaw(params: UnfavoritePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.playlistId === null || params.playlistId === undefined) { + throw new runtime.RequiredError('playlistId','Required parameter params.playlistId was null or undefined when calling unfavoritePlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/playlists/{playlist_id}/favorites`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Unfavorite a playlist + */ + async unfavoritePlaylist(params: UnfavoritePlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unfavoritePlaylistRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Unrepost a playlist + */ + async unrepostPlaylistRaw(params: UnrepostPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.playlistId === null || params.playlistId === undefined) { + throw new runtime.RequiredError('playlistId','Required parameter params.playlistId was null or undefined when calling unrepostPlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/playlists/{playlist_id}/reposts`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Unrepost a playlist + */ + async unrepostPlaylist(params: UnrepostPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unrepostPlaylistRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Updates an existing playlist or album + */ + async updatePlaylistRaw(params: UpdatePlaylistOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.playlistId === null || params.playlistId === undefined) { + throw new runtime.RequiredError('playlistId','Required parameter params.playlistId was null or undefined when calling updatePlaylist.'); + } + + if (params.updatePlaylistRequest === null || params.updatePlaylistRequest === undefined) { + throw new runtime.RequiredError('updatePlaylistRequest','Required parameter params.updatePlaylistRequest was null or undefined when calling updatePlaylist.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/playlists/{playlist_id}`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdatePlaylistRequestToJSON(params.updatePlaylistRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Updates an existing playlist or album + */ + async updatePlaylist(params: UpdatePlaylistOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updatePlaylistRaw(params, initOverrides); + return await response.value(); + } + } /** @@ -395,6 +756,16 @@ export const GetTrendingPlaylistsTypeEnum = { Album: 'album' } as const; export type GetTrendingPlaylistsTypeEnum = typeof GetTrendingPlaylistsTypeEnum[keyof typeof GetTrendingPlaylistsTypeEnum]; +/** + * @export + */ +export const GetTrendingPlaylistsWithVersionTimeEnum = { + Week: 'week', + Month: 'month', + Year: 'year', + AllTime: 'allTime' +} as const; +export type GetTrendingPlaylistsWithVersionTimeEnum = typeof GetTrendingPlaylistsWithVersionTimeEnum[keyof typeof GetTrendingPlaylistsWithVersionTimeEnum]; /** * @export */ diff --git a/packages/sdk/src/sdk/api/generated/default/apis/ReactionsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/ReactionsApi.ts new file mode 100644 index 00000000000..387c70e358f --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/apis/ReactionsApi.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +// @ts-nocheck +/* eslint-disable */ +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Reactions, +} from '../models'; +import { + ReactionsFromJSON, + ReactionsToJSON, +} from '../models'; + +export interface BulkGetReactionsRequest { + reactedToIds: Array; + type?: string; +} + +/** + * + */ +export class ReactionsApi extends runtime.BaseAPI { + + /** + * @hidden + * Gets reactions by reacted_to_id and type + */ + async bulkGetReactionsRaw(params: BulkGetReactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.reactedToIds === null || params.reactedToIds === undefined) { + throw new runtime.RequiredError('reactedToIds','Required parameter params.reactedToIds was null or undefined when calling bulkGetReactions.'); + } + + const queryParameters: any = {}; + + if (params.type !== undefined) { + queryParameters['type'] = params.type; + } + + if (params.reactedToIds) { + queryParameters['reacted_to_ids'] = params.reactedToIds.join(runtime.COLLECTION_FORMATS["csv"]); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/reactions`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReactionsFromJSON(jsonValue)); + } + + /** + * Gets reactions by reacted_to_id and type + */ + async bulkGetReactions(params: BulkGetReactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.bulkGetReactionsRaw(params, initOverrides); + return await response.value(); + } + +} diff --git a/packages/sdk/src/sdk/api/generated/default/apis/SearchApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/SearchApi.ts new file mode 100644 index 00000000000..498bdbbf901 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/apis/SearchApi.ts @@ -0,0 +1,412 @@ +/* tslint:disable */ +// @ts-nocheck +/* eslint-disable */ +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + SearchAutocompleteResponse, + SearchFullResponse, +} from '../models'; +import { + SearchAutocompleteResponseFromJSON, + SearchAutocompleteResponseToJSON, + SearchFullResponseFromJSON, + SearchFullResponseToJSON, +} from '../models'; + +export interface SearchRequest { + offset?: number; + limit?: number; + userId?: string; + query?: string; + kind?: SearchKindEnum; + includePurchaseable?: boolean; + genre?: Array; + mood?: Array; + isVerified?: boolean; + hasDownloads?: boolean; + isPurchaseable?: boolean; + key?: Array; + bpmMin?: number; + bpmMax?: number; + sortMethod?: SearchSortMethodEnum; +} + +export interface SearchAutocompleteRequest { + offset?: number; + limit?: number; + userId?: string; + query?: string; + kind?: SearchAutocompleteKindEnum; + includePurchaseable?: boolean; + genre?: Array; + mood?: Array; + isVerified?: boolean; + hasDownloads?: boolean; + isPurchaseable?: boolean; + key?: Array; + bpmMin?: number; + bpmMax?: number; + sortMethod?: SearchAutocompleteSortMethodEnum; +} + +export interface SearchTagsRequest { + offset?: number; + limit?: number; + userId?: string; + query?: string; + kind?: SearchTagsKindEnum; + includePurchaseable?: boolean; + genre?: Array; + mood?: Array; + isVerified?: boolean; + hasDownloads?: boolean; + isPurchaseable?: boolean; + key?: Array; + bpmMin?: number; + bpmMax?: number; + sortMethod?: SearchTagsSortMethodEnum; +} + +/** + * + */ +export class SearchApi extends runtime.BaseAPI { + + /** + * @hidden + * Get Users/Tracks/Playlists/Albums that best match the search query + */ + async searchRaw(params: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.kind !== undefined) { + queryParameters['kind'] = params.kind; + } + + if (params.includePurchaseable !== undefined) { + queryParameters['includePurchaseable'] = params.includePurchaseable; + } + + if (params.genre) { + queryParameters['genre'] = params.genre; + } + + if (params.mood) { + queryParameters['mood'] = params.mood; + } + + if (params.isVerified !== undefined) { + queryParameters['is_verified'] = params.isVerified; + } + + if (params.hasDownloads !== undefined) { + queryParameters['has_downloads'] = params.hasDownloads; + } + + if (params.isPurchaseable !== undefined) { + queryParameters['is_purchaseable'] = params.isPurchaseable; + } + + if (params.key) { + queryParameters['key'] = params.key; + } + + if (params.bpmMin !== undefined) { + queryParameters['bpm_min'] = params.bpmMin; + } + + if (params.bpmMax !== undefined) { + queryParameters['bpm_max'] = params.bpmMax; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/search/full`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SearchFullResponseFromJSON(jsonValue)); + } + + /** + * Get Users/Tracks/Playlists/Albums that best match the search query + */ + async search(params: SearchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.searchRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Same as search but optimized for quicker response at the cost of some entity information. + * Get Users/Tracks/Playlists/Albums that best match the search query + */ + async searchAutocompleteRaw(params: SearchAutocompleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.kind !== undefined) { + queryParameters['kind'] = params.kind; + } + + if (params.includePurchaseable !== undefined) { + queryParameters['includePurchaseable'] = params.includePurchaseable; + } + + if (params.genre) { + queryParameters['genre'] = params.genre; + } + + if (params.mood) { + queryParameters['mood'] = params.mood; + } + + if (params.isVerified !== undefined) { + queryParameters['is_verified'] = params.isVerified; + } + + if (params.hasDownloads !== undefined) { + queryParameters['has_downloads'] = params.hasDownloads; + } + + if (params.isPurchaseable !== undefined) { + queryParameters['is_purchaseable'] = params.isPurchaseable; + } + + if (params.key) { + queryParameters['key'] = params.key; + } + + if (params.bpmMin !== undefined) { + queryParameters['bpm_min'] = params.bpmMin; + } + + if (params.bpmMax !== undefined) { + queryParameters['bpm_max'] = params.bpmMax; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/search/autocomplete`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SearchAutocompleteResponseFromJSON(jsonValue)); + } + + /** + * Same as search but optimized for quicker response at the cost of some entity information. + * Get Users/Tracks/Playlists/Albums that best match the search query + */ + async searchAutocomplete(params: SearchAutocompleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.searchAutocompleteRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get Users/Tracks/Playlists/Albums that best match the provided tag + */ + async searchTagsRaw(params: SearchTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.kind !== undefined) { + queryParameters['kind'] = params.kind; + } + + if (params.includePurchaseable !== undefined) { + queryParameters['includePurchaseable'] = params.includePurchaseable; + } + + if (params.genre) { + queryParameters['genre'] = params.genre; + } + + if (params.mood) { + queryParameters['mood'] = params.mood; + } + + if (params.isVerified !== undefined) { + queryParameters['is_verified'] = params.isVerified; + } + + if (params.hasDownloads !== undefined) { + queryParameters['has_downloads'] = params.hasDownloads; + } + + if (params.isPurchaseable !== undefined) { + queryParameters['is_purchaseable'] = params.isPurchaseable; + } + + if (params.key) { + queryParameters['key'] = params.key; + } + + if (params.bpmMin !== undefined) { + queryParameters['bpm_min'] = params.bpmMin; + } + + if (params.bpmMax !== undefined) { + queryParameters['bpm_max'] = params.bpmMax; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/search/tags`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SearchFullResponseFromJSON(jsonValue)); + } + + /** + * Get Users/Tracks/Playlists/Albums that best match the provided tag + */ + async searchTags(params: SearchTagsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.searchTagsRaw(params, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const SearchKindEnum = { + All: 'all', + Users: 'users', + Tracks: 'tracks', + Playlists: 'playlists', + Albums: 'albums' +} as const; +export type SearchKindEnum = typeof SearchKindEnum[keyof typeof SearchKindEnum]; +/** + * @export + */ +export const SearchSortMethodEnum = { + Relevant: 'relevant', + Popular: 'popular', + Recent: 'recent' +} as const; +export type SearchSortMethodEnum = typeof SearchSortMethodEnum[keyof typeof SearchSortMethodEnum]; +/** + * @export + */ +export const SearchAutocompleteKindEnum = { + All: 'all', + Users: 'users', + Tracks: 'tracks', + Playlists: 'playlists', + Albums: 'albums' +} as const; +export type SearchAutocompleteKindEnum = typeof SearchAutocompleteKindEnum[keyof typeof SearchAutocompleteKindEnum]; +/** + * @export + */ +export const SearchAutocompleteSortMethodEnum = { + Relevant: 'relevant', + Popular: 'popular', + Recent: 'recent' +} as const; +export type SearchAutocompleteSortMethodEnum = typeof SearchAutocompleteSortMethodEnum[keyof typeof SearchAutocompleteSortMethodEnum]; +/** + * @export + */ +export const SearchTagsKindEnum = { + All: 'all', + Users: 'users', + Tracks: 'tracks', + Playlists: 'playlists', + Albums: 'albums' +} as const; +export type SearchTagsKindEnum = typeof SearchTagsKindEnum[keyof typeof SearchTagsKindEnum]; +/** + * @export + */ +export const SearchTagsSortMethodEnum = { + Relevant: 'relevant', + Popular: 'popular', + Recent: 'recent' +} as const; +export type SearchTagsSortMethodEnum = typeof SearchTagsSortMethodEnum[keyof typeof SearchTagsSortMethodEnum]; diff --git a/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts index e3e3067a241..6fa49de88f3 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts @@ -17,6 +17,12 @@ import * as runtime from '../runtime'; import type { AccessInfoResponse, + CreateComment201Response, + CreateTrack201Response, + CreateTrackRequest, + FullTracksResponse, + RecordTrackDownloadRequest, + RemixablesResponse, RemixesResponse, RemixingResponse, StemsResponse, @@ -33,10 +39,23 @@ import type { TrackSearch, TracksResponse, TrendingIdsResponse, + UpdateTrackRequest, } from '../models'; import { AccessInfoResponseFromJSON, AccessInfoResponseToJSON, + CreateComment201ResponseFromJSON, + CreateComment201ResponseToJSON, + CreateTrack201ResponseFromJSON, + CreateTrack201ResponseToJSON, + CreateTrackRequestFromJSON, + CreateTrackRequestToJSON, + FullTracksResponseFromJSON, + FullTracksResponseToJSON, + RecordTrackDownloadRequestFromJSON, + RecordTrackDownloadRequestToJSON, + RemixablesResponseFromJSON, + RemixablesResponseToJSON, RemixesResponseFromJSON, RemixesResponseToJSON, RemixingResponseFromJSON, @@ -69,8 +88,18 @@ import { TracksResponseToJSON, TrendingIdsResponseFromJSON, TrendingIdsResponseToJSON, + UpdateTrackRequestFromJSON, + UpdateTrackRequestToJSON, } from '../models'; +export interface CreateTrackOperationRequest { + createTrackRequest: CreateTrackRequest; +} + +export interface DeleteTrackRequest { + trackId: string; +} + export interface DownloadTrackRequest { trackId: string; userId?: string; @@ -80,6 +109,17 @@ export interface DownloadTrackRequest { filename?: string; } +export interface FavoriteTrackRequest { + trackId: string; +} + +export interface GetBestNewReleasesRequest { + window: GetBestNewReleasesWindowEnum; + userId?: string; + limit?: number; + withUsers?: boolean; +} + export interface GetBulkTracksRequest { permalink?: Array; id?: Array; @@ -94,6 +134,12 @@ export interface GetFeelingLuckyTracksRequest { minFollowers?: number; } +export interface GetMostLovedTracksRequest { + userId?: string; + limit?: number; + withUsers?: boolean; +} + export interface GetMostSharedTracksRequest { userId?: string; limit?: number; @@ -124,6 +170,12 @@ export interface GetRecommendedTracksWithVersionRequest { userId?: string; } +export interface GetRemixableTracksRequest { + limit?: number; + userId?: string; + withUsers?: boolean; +} + export interface GetTrackRequest { trackId: string; userId?: string; @@ -233,6 +285,15 @@ export interface GetTrendingUSDCPurchaseTracksWithVersionRequest { time?: GetTrendingUSDCPurchaseTracksWithVersionTimeEnum; } +export interface GetUnderTheRadarTracksRequest { + offset?: number; + limit?: number; + userId?: string; + filter?: GetUnderTheRadarTracksFilterEnum; + tracksOnly?: boolean; + withUsers?: boolean; +} + export interface GetUndergroundTrendingTracksRequest { offset?: number; limit?: number; @@ -270,6 +331,15 @@ export interface InspectTracksRequest { original?: boolean; } +export interface RecordTrackDownloadOperationRequest { + trackId: string; + recordTrackDownloadRequest?: RecordTrackDownloadRequest; +} + +export interface RepostTrackRequest { + trackId: string; +} + export interface SearchTracksRequest { offset?: number; limit?: number; @@ -286,6 +356,10 @@ export interface SearchTracksRequest { bpmMax?: string; } +export interface ShareTrackRequest { + trackId: string; +} + export interface StreamTrackRequest { trackId: string; userId?: string; @@ -299,11 +373,89 @@ export interface StreamTrackRequest { noRedirect?: boolean; } +export interface UnfavoriteTrackRequest { + trackId: string; +} + +export interface UnrepostTrackRequest { + trackId: string; +} + +export interface UpdateTrackOperationRequest { + trackId: string; + updateTrackRequest: UpdateTrackRequest; +} + /** * */ export class TracksApi extends runtime.BaseAPI { + /** + * @hidden + * Creates a new track + */ + async createTrackRaw(params: CreateTrackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.createTrackRequest === null || params.createTrackRequest === undefined) { + throw new runtime.RequiredError('createTrackRequest','Required parameter params.createTrackRequest was null or undefined when calling createTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/tracks`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateTrackRequestToJSON(params.createTrackRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateTrack201ResponseFromJSON(jsonValue)); + } + + /** + * Creates a new track + */ + async createTrack(params: CreateTrackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createTrackRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Deletes a track + */ + async deleteTrackRaw(params: DeleteTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling deleteTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Deletes a track + */ + async deleteTrack(params: DeleteTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteTrackRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Download an original or mp3 track @@ -356,6 +508,84 @@ export class TracksApi extends runtime.BaseAPI { await this.downloadTrackRaw(params, initOverrides); } + /** + * @hidden + * Favorite a track + */ + async favoriteTrackRaw(params: FavoriteTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling favoriteTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/favorites`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Favorite a track + */ + async favoriteTrack(params: FavoriteTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.favoriteTrackRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the tracks found on the \"Best New Releases\" smart playlist + */ + async getBestNewReleasesRaw(params: GetBestNewReleasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.window === null || params.window === undefined) { + throw new runtime.RequiredError('window','Required parameter params.window was null or undefined when calling getBestNewReleases.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.window !== undefined) { + queryParameters['window'] = params.window; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.withUsers !== undefined) { + queryParameters['with_users'] = params.withUsers; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/best_new_releases`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FullTracksResponseFromJSON(jsonValue)); + } + + /** + * Gets the tracks found on the \"Best New Releases\" smart playlist + */ + async getBestNewReleases(params: GetBestNewReleasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getBestNewReleasesRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets a list of tracks using their IDs or permalinks @@ -442,6 +672,45 @@ export class TracksApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Gets the tracks found on the \"Most Loved\" smart playlist + */ + async getMostLovedTracksRaw(params: GetMostLovedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.withUsers !== undefined) { + queryParameters['with_users'] = params.withUsers; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/most_loved`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FullTracksResponseFromJSON(jsonValue)); + } + + /** + * Gets the tracks found on the \"Most Loved\" smart playlist + */ + async getMostLovedTracks(params: GetMostLovedTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMostLovedTracksRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets the most shared tracks for a given time range @@ -622,6 +891,45 @@ export class TracksApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Gets a list of tracks that have stems available for remixing + */ + async getRemixableTracksRaw(params: GetRemixableTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.withUsers !== undefined) { + queryParameters['with_users'] = params.withUsers; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/remixables`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RemixablesResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of tracks that have stems available for remixing + */ + async getRemixableTracks(params: GetRemixableTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRemixableTracksRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets a track by ID @@ -1298,6 +1606,57 @@ export class TracksApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Gets the tracks found on the \"Under the Radar\" smart playlist + */ + async getUnderTheRadarTracksRaw(params: GetUnderTheRadarTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.filter !== undefined) { + queryParameters['filter'] = params.filter; + } + + if (params.tracksOnly !== undefined) { + queryParameters['tracks_only'] = params.tracksOnly; + } + + if (params.withUsers !== undefined) { + queryParameters['with_users'] = params.withUsers; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/under_the_radar`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FullTracksResponseFromJSON(jsonValue)); + } + + /** + * Gets the tracks found on the \"Under the Radar\" smart playlist + */ + async getUnderTheRadarTracks(params: GetUnderTheRadarTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUnderTheRadarTracksRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets the top 100 trending underground tracks on Audius @@ -1544,6 +1903,71 @@ export class TracksApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Record a track download event + */ + async recordTrackDownloadRaw(params: RecordTrackDownloadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling recordTrackDownload.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/tracks/{track_id}/downloads`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RecordTrackDownloadRequestToJSON(params.recordTrackDownloadRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Record a track download event + */ + async recordTrackDownload(params: RecordTrackDownloadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.recordTrackDownloadRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Repost a track + */ + async repostTrackRaw(params: RepostTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling repostTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/reposts`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Repost a track + */ + async repostTrack(params: RepostTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.repostTrackRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Search for a track or tracks @@ -1623,6 +2047,37 @@ export class TracksApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Record a track share event + */ + async shareTrackRaw(params: ShareTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling shareTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/shares`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Record a track share event + */ + async shareTrack(params: ShareTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.shareTrackRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Stream an mp3 track This endpoint accepts the Range header for streaming. https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests @@ -1692,8 +2147,117 @@ export class TracksApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Unfavorite a track + */ + async unfavoriteTrackRaw(params: UnfavoriteTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling unfavoriteTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/favorites`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Unfavorite a track + */ + async unfavoriteTrack(params: UnfavoriteTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unfavoriteTrackRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Unrepost a track + */ + async unrepostTrackRaw(params: UnrepostTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling unrepostTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/reposts`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Unrepost a track + */ + async unrepostTrack(params: UnrepostTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unrepostTrackRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Updates an existing track + */ + async updateTrackRaw(params: UpdateTrackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling updateTrack.'); + } + + if (params.updateTrackRequest === null || params.updateTrackRequest === undefined) { + throw new runtime.RequiredError('updateTrackRequest','Required parameter params.updateTrackRequest was null or undefined when calling updateTrack.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/tracks/{track_id}`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateTrackRequestToJSON(params.updateTrackRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Updates an existing track + */ + async updateTrack(params: UpdateTrackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateTrackRaw(params, initOverrides); + return await response.value(); + } + } +/** + * @export + */ +export const GetBestNewReleasesWindowEnum = { + Week: 'week', + Month: 'month', + Year: 'year' +} as const; +export type GetBestNewReleasesWindowEnum = typeof GetBestNewReleasesWindowEnum[keyof typeof GetBestNewReleasesWindowEnum]; /** * @export */ @@ -1781,6 +2345,15 @@ export const GetTrendingUSDCPurchaseTracksWithVersionTimeEnum = { AllTime: 'allTime' } as const; export type GetTrendingUSDCPurchaseTracksWithVersionTimeEnum = typeof GetTrendingUSDCPurchaseTracksWithVersionTimeEnum[keyof typeof GetTrendingUSDCPurchaseTracksWithVersionTimeEnum]; +/** + * @export + */ +export const GetUnderTheRadarTracksFilterEnum = { + All: 'all', + Repost: 'repost', + Original: 'original' +} as const; +export type GetUnderTheRadarTracksFilterEnum = typeof GetUnderTheRadarTracksFilterEnum[keyof typeof GetUnderTheRadarTracksFilterEnum]; /** * @export */ diff --git a/packages/sdk/src/sdk/api/generated/default/apis/TransactionsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/TransactionsApi.ts new file mode 100644 index 00000000000..8d9401208bc --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/apis/TransactionsApi.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +// @ts-nocheck +/* eslint-disable */ +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + TransactionHistoryCountResponse, + TransactionHistoryResponse, +} from '../models'; +import { + TransactionHistoryCountResponseFromJSON, + TransactionHistoryCountResponseToJSON, + TransactionHistoryResponseFromJSON, + TransactionHistoryResponseToJSON, +} from '../models'; + +export interface GetAudioTransactionHistoryRequest { + offset?: number; + limit?: number; + sortMethod?: GetAudioTransactionHistorySortMethodEnum; + sortDirection?: GetAudioTransactionHistorySortDirectionEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetAudioTransactionHistoryCountRequest { + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +/** + * + */ +export class TransactionsApi extends runtime.BaseAPI { + + /** + * @hidden + * @deprecated + * Deprecated: Use `/users/{id}/transactions/audio` or `sdk.full.users.getAudioTransactions()` instead. + * Gets the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactionHistoryRaw(params: GetAudioTransactionHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/transactions`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryResponseFromJSON(jsonValue)); + } + + /** + * @deprecated + * Deprecated: Use `/users/{id}/transactions/audio` or `sdk.full.users.getAudioTransactions()` instead. + * Gets the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactionHistory(params: GetAudioTransactionHistoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAudioTransactionHistoryRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * @deprecated + * Deprecated: Use `/users/{id}/transactions/audio/count` or `sdk.full.users.getAudioTransactionCount()` instead. + * Gets the count of the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactionHistoryCountRaw(params: GetAudioTransactionHistoryCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/transactions/count`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryCountResponseFromJSON(jsonValue)); + } + + /** + * @deprecated + * Deprecated: Use `/users/{id}/transactions/audio/count` or `sdk.full.users.getAudioTransactionCount()` instead. + * Gets the count of the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactionHistoryCount(params: GetAudioTransactionHistoryCountRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAudioTransactionHistoryCountRaw(params, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const GetAudioTransactionHistorySortMethodEnum = { + Date: 'date', + TransactionType: 'transaction_type' +} as const; +export type GetAudioTransactionHistorySortMethodEnum = typeof GetAudioTransactionHistorySortMethodEnum[keyof typeof GetAudioTransactionHistorySortMethodEnum]; +/** + * @export + */ +export const GetAudioTransactionHistorySortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetAudioTransactionHistorySortDirectionEnum = typeof GetAudioTransactionHistorySortDirectionEnum[keyof typeof GetAudioTransactionHistorySortDirectionEnum]; diff --git a/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts index edbc951196a..2700ffdc78e 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts @@ -20,31 +20,53 @@ import type { AuthorizedApps, BalanceHistoryResponse, CollectiblesResponse, + CollectionLibraryResponseFull, ConnectedWalletsResponse, + CreateComment201Response, + CreateUser201Response, + CreateUserRequest, DeveloperApps, EmailAccessResponse, FavoritesResponse, FollowersResponse, FollowingResponse, + FullBulkSubscribersResponse, + FullGetSupporter, + FullGetSupporting, + FullReposts, GetChallenges, GetSupportedUsers, GetSupporters, HistoryResponse, + ManagedUsersResponse, + ManagersResponse, MutualFollowersResponse, PlaylistsResponse, + PurchasersCountResponse, PurchasersResponse, + PurchasesCountResponse, + PurchasesResponse, RelatedArtistResponse, + RemixersCountResponse, RemixersResponse, Reposts, SalesAggregateResponse, SalesJsonResponse, SubscribersResponse, TagsResponse, + TopGenreUsersResponseFull, + TopUsersResponseFull, + TrackLibraryResponseFull, TracksCountResponse, TracksResponse, + TransactionHistoryCountResponse, + TransactionHistoryResponse, + UpdateUserRequest, + UserAccountResponseFull, UserCoinResponse, UserCoinsResponse, UserCommentsResponse, + UserFeedResponse, UserIdsAddressesResponse, UserResponse, UserSearch, @@ -62,8 +84,16 @@ import { BalanceHistoryResponseToJSON, CollectiblesResponseFromJSON, CollectiblesResponseToJSON, + CollectionLibraryResponseFullFromJSON, + CollectionLibraryResponseFullToJSON, ConnectedWalletsResponseFromJSON, ConnectedWalletsResponseToJSON, + CreateComment201ResponseFromJSON, + CreateComment201ResponseToJSON, + CreateUser201ResponseFromJSON, + CreateUser201ResponseToJSON, + CreateUserRequestFromJSON, + CreateUserRequestToJSON, DeveloperAppsFromJSON, DeveloperAppsToJSON, EmailAccessResponseFromJSON, @@ -74,6 +104,14 @@ import { FollowersResponseToJSON, FollowingResponseFromJSON, FollowingResponseToJSON, + FullBulkSubscribersResponseFromJSON, + FullBulkSubscribersResponseToJSON, + FullGetSupporterFromJSON, + FullGetSupporterToJSON, + FullGetSupportingFromJSON, + FullGetSupportingToJSON, + FullRepostsFromJSON, + FullRepostsToJSON, GetChallengesFromJSON, GetChallengesToJSON, GetSupportedUsersFromJSON, @@ -82,14 +120,26 @@ import { GetSupportersToJSON, HistoryResponseFromJSON, HistoryResponseToJSON, + ManagedUsersResponseFromJSON, + ManagedUsersResponseToJSON, + ManagersResponseFromJSON, + ManagersResponseToJSON, MutualFollowersResponseFromJSON, MutualFollowersResponseToJSON, PlaylistsResponseFromJSON, PlaylistsResponseToJSON, + PurchasersCountResponseFromJSON, + PurchasersCountResponseToJSON, PurchasersResponseFromJSON, PurchasersResponseToJSON, + PurchasesCountResponseFromJSON, + PurchasesCountResponseToJSON, + PurchasesResponseFromJSON, + PurchasesResponseToJSON, RelatedArtistResponseFromJSON, RelatedArtistResponseToJSON, + RemixersCountResponseFromJSON, + RemixersCountResponseToJSON, RemixersResponseFromJSON, RemixersResponseToJSON, RepostsFromJSON, @@ -102,16 +152,32 @@ import { SubscribersResponseToJSON, TagsResponseFromJSON, TagsResponseToJSON, + TopGenreUsersResponseFullFromJSON, + TopGenreUsersResponseFullToJSON, + TopUsersResponseFullFromJSON, + TopUsersResponseFullToJSON, + TrackLibraryResponseFullFromJSON, + TrackLibraryResponseFullToJSON, TracksCountResponseFromJSON, TracksCountResponseToJSON, TracksResponseFromJSON, TracksResponseToJSON, + TransactionHistoryCountResponseFromJSON, + TransactionHistoryCountResponseToJSON, + TransactionHistoryResponseFromJSON, + TransactionHistoryResponseToJSON, + UpdateUserRequestFromJSON, + UpdateUserRequestToJSON, + UserAccountResponseFullFromJSON, + UserAccountResponseFullToJSON, UserCoinResponseFromJSON, UserCoinResponseToJSON, UserCoinsResponseFromJSON, UserCoinsResponseToJSON, UserCommentsResponseFromJSON, UserCommentsResponseToJSON, + UserFeedResponseFromJSON, + UserFeedResponseToJSON, UserIdsAddressesResponseFromJSON, UserIdsAddressesResponseToJSON, UserResponseFromJSON, @@ -128,6 +194,18 @@ import { VerifyTokenToJSON, } from '../models'; +export interface BulkGetSubscribersRequest { + ids: Array; +} + +export interface BulkGetSubscribersViaJSONRequestRequest { + ids: Array; +} + +export interface CreateUserOperationRequest { + createUserRequest: CreateUserRequest; +} + export interface DownloadPurchasesAsCSVRequest { id: string; userId?: string; @@ -157,6 +235,10 @@ export interface DownloadUSDCWithdrawalsAsCSVRequest { encodedDataSignature?: string; } +export interface FollowUserRequest { + id: string; +} + export interface GetAIAttributedTracksByUserHandleRequest { handle: string; offset?: number; @@ -182,6 +264,22 @@ export interface GetAlbumsByUserRequest { encodedDataSignature?: string; } +export interface GetAudioTransactionCountRequest { + id: string; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetAudioTransactionsRequest { + id: string; + offset?: number; + limit?: number; + sortMethod?: GetAudioTransactionsSortMethodEnum; + sortDirection?: GetAudioTransactionsSortDirectionEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetAuthorizedAppsRequest { id: string; } @@ -199,6 +297,16 @@ export interface GetDeveloperAppsRequest { id: string; } +export interface GetFavoriteTracksRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + query?: string; + sortMethod?: GetFavoriteTracksSortMethodEnum; + sortDirection?: GetFavoriteTracksSortDirectionEnum; +} + export interface GetFavoritesRequest { id: string; } @@ -217,6 +325,22 @@ export interface GetFollowingRequest { userId?: string; } +export interface GetManagedUsersRequest { + id: string; + isApproved?: boolean; + isRevoked?: boolean; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetManagersRequest { + id: string; + isApproved?: boolean; + isRevoked?: boolean; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetMutedUsersRequest { id: string; encodedDataMessage?: string; @@ -250,6 +374,35 @@ export interface GetPurchasersRequest { contentId?: string; } +export interface GetPurchasersCountRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + contentType?: string; + contentId?: string; +} + +export interface GetPurchasesRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + sortMethod?: GetPurchasesSortMethodEnum; + sortDirection?: GetPurchasesSortDirectionEnum; + contentIds?: Array; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetPurchasesCountRequest { + id: string; + userId?: string; + contentIds?: Array; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetRelatedUsersRequest { id: string; offset?: number; @@ -266,6 +419,12 @@ export interface GetRemixersRequest { trackId?: string; } +export interface GetRemixersCountRequest { + id: string; + userId?: string; + trackId?: string; +} + export interface GetRepostsRequest { id: string; offset?: number; @@ -273,6 +432,25 @@ export interface GetRepostsRequest { userId?: string; } +export interface GetRepostsByHandleRequest { + handle: string; + offset?: number; + limit?: number; + userId?: string; +} + +export interface GetSalesRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + sortMethod?: GetSalesSortMethodEnum; + sortDirection?: GetSalesSortDirectionEnum; + contentIds?: Array; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetSalesAggregateRequest { id: string; offset?: number; @@ -282,6 +460,14 @@ export interface GetSalesAggregateRequest { encodedDataSignature?: string; } +export interface GetSalesCountRequest { + id: string; + userId?: string; + contentIds?: Array; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetSubscribersRequest { id: string; offset?: number; @@ -296,6 +482,12 @@ export interface GetSupportedUsersRequest { userId?: string; } +export interface GetSupporterRequest { + id: string; + supporterUserId: string; + userId?: string; +} + export interface GetSupportersRequest { id: string; offset?: number; @@ -303,12 +495,30 @@ export interface GetSupportersRequest { userId?: string; } +export interface GetSupportingRequest { + id: string; + supportedUserId: string; + userId?: string; +} + export interface GetTopTrackTagsRequest { id: string; limit?: number; userId?: string; } +export interface GetTopUsersRequest { + offset?: number; + limit?: number; + userId?: string; +} + +export interface GetTopUsersInGenreRequest { + offset?: number; + limit?: number; + genre?: Array; +} + export interface GetTracksByUserRequest { id: string; offset?: number; @@ -347,11 +557,39 @@ export interface GetTracksCountByUserRequest { encodedDataSignature?: string; } +export interface GetUSDCTransactionCountRequest { + id: string; + type?: Array; + includeSystemTransactions?: boolean; + method?: GetUSDCTransactionCountMethodEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetUSDCTransactionsRequest { + id: string; + offset?: number; + limit?: number; + sortMethod?: GetUSDCTransactionsSortMethodEnum; + sortDirection?: GetUSDCTransactionsSortDirectionEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; + type?: Array; + includeSystemTransactions?: boolean; + method?: GetUSDCTransactionsMethodEnum; +} + export interface GetUserRequest { id: string; userId?: string; } +export interface GetUserAccountRequest { + wallet: string; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetUserBalanceHistoryRequest { id: string; startTime?: Date; @@ -399,10 +637,62 @@ export interface GetUserEmailKeyRequest { grantorUserId: string; } +export interface GetUserFeedRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + filter?: GetUserFeedFilterEnum; + tracksOnly?: boolean; + withUsers?: boolean; + followeeUserId?: Array; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetUserIDsByAddressesRequest { address: Array; } +export interface GetUserLibraryAlbumsRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + query?: string; + sortDirection?: GetUserLibraryAlbumsSortDirectionEnum; + type?: GetUserLibraryAlbumsTypeEnum; + sortMethod?: GetUserLibraryAlbumsSortMethodEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetUserLibraryPlaylistsRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + query?: string; + sortDirection?: GetUserLibraryPlaylistsSortDirectionEnum; + type?: GetUserLibraryPlaylistsTypeEnum; + sortMethod?: GetUserLibraryPlaylistsSortMethodEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetUserLibraryTracksRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + query?: string; + sortMethod?: GetUserLibraryTracksSortMethodEnum; + sortDirection?: GetUserLibraryTracksSortDirectionEnum; + type?: GetUserLibraryTracksTypeEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + export interface GetUserMonthlyTrackListensRequest { id: string; startTime: string; @@ -436,6 +726,10 @@ export interface GetUsersTrackHistoryRequest { encodedDataSignature?: string; } +export interface MuteUserRequest { + id: string; +} + export interface SearchUsersRequest { offset?: number; limit?: number; @@ -445,6 +739,27 @@ export interface SearchUsersRequest { isVerified?: string; } +export interface SubscribeToUserRequest { + id: string; +} + +export interface UnfollowUserRequest { + id: string; +} + +export interface UnmuteUserRequest { + id: string; +} + +export interface UnsubscribeFromUserRequest { + id: string; +} + +export interface UpdateUserOperationRequest { + id: string; + updateUserRequest: UpdateUserRequest; +} + export interface VerifyIDTokenRequest { token: string; } @@ -454,6 +769,110 @@ export interface VerifyIDTokenRequest { */ export class UsersApi extends runtime.BaseAPI { + /** + * @hidden + * All users that subscribe to the provided users + */ + async bulkGetSubscribersRaw(params: BulkGetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.ids === null || params.ids === undefined) { + throw new runtime.RequiredError('ids','Required parameter params.ids was null or undefined when calling bulkGetSubscribers.'); + } + + const queryParameters: any = {}; + + if (params.ids) { + queryParameters['ids'] = params.ids.join(runtime.COLLECTION_FORMATS["csv"]); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/subscribers`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FullBulkSubscribersResponseFromJSON(jsonValue)); + } + + /** + * All users that subscribe to the provided users + */ + async bulkGetSubscribers(params: BulkGetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.bulkGetSubscribersRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get all users that subscribe to the users listed in the JSON request + */ + async bulkGetSubscribersViaJSONRequestRaw(params: BulkGetSubscribersViaJSONRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.ids === null || params.ids === undefined) { + throw new runtime.RequiredError('ids','Required parameter params.ids was null or undefined when calling bulkGetSubscribersViaJSONRequest.'); + } + + const queryParameters: any = {}; + + if (params.ids) { + queryParameters['ids'] = params.ids.join(runtime.COLLECTION_FORMATS["csv"]); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/subscribers`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FullBulkSubscribersResponseFromJSON(jsonValue)); + } + + /** + * Get all users that subscribe to the users listed in the JSON request + */ + async bulkGetSubscribersViaJSONRequest(params: BulkGetSubscribersViaJSONRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.bulkGetSubscribersViaJSONRequestRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Creates a new user + */ + async createUserRaw(params: CreateUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.createUserRequest === null || params.createUserRequest === undefined) { + throw new runtime.RequiredError('createUserRequest','Required parameter params.createUserRequest was null or undefined when calling createUser.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/users`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateUserRequestToJSON(params.createUserRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateUser201ResponseFromJSON(jsonValue)); + } + + /** + * Creates a new user + */ + async createUser(params: CreateUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createUserRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Downloads the purchases the user has made as a CSV file @@ -629,24 +1048,55 @@ export class UsersApi extends runtime.BaseAPI { /** * @hidden - * Gets the AI generated tracks attributed to a user using the user\'s handle + * Follow a user */ - async getAIAttributedTracksByUserHandleRaw(params: GetAIAttributedTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.handle === null || params.handle === undefined) { - throw new runtime.RequiredError('handle','Required parameter params.handle was null or undefined when calling getAIAttributedTracksByUserHandle.'); + async followUserRaw(params: FollowUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling followUser.'); } const queryParameters: any = {}; - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; - } - - if (params.limit !== undefined) { - queryParameters['limit'] = params.limit; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (params.userId !== undefined) { + const response = await this.request({ + path: `/users/{id}/follow`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Follow a user + */ + async followUser(params: FollowUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.followUserRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the AI generated tracks attributed to a user using the user\'s handle + */ + async getAIAttributedTracksByUserHandleRaw(params: GetAIAttributedTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.handle === null || params.handle === undefined) { + throw new runtime.RequiredError('handle','Required parameter params.handle was null or undefined when calling getAIAttributedTracksByUserHandle.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { queryParameters['user_id'] = params.userId; } @@ -757,6 +1207,100 @@ export class UsersApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Gets the count of the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactionCountRaw(params: GetAudioTransactionCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getAudioTransactionCount.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/transactions/audio/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryCountResponseFromJSON(jsonValue)); + } + + /** + * Gets the count of the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactionCount(params: GetAudioTransactionCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAudioTransactionCountRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactionsRaw(params: GetAudioTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getAudioTransactions.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/transactions/audio`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryResponseFromJSON(jsonValue)); + } + + /** + * Gets the user\'s $AUDIO transaction history within the App + */ + async getAudioTransactions(params: GetAudioTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAudioTransactionsRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Get the apps that user has authorized to write to their account @@ -885,6 +1429,61 @@ export class UsersApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Gets a user\'s favorite tracks + */ + async getFavoriteTracksRaw(params: GetFavoriteTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getFavoriteTracks.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/favorites/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrackLibraryResponseFullFromJSON(jsonValue)); + } + + /** + * Gets a user\'s favorite tracks + */ + async getFavoriteTracks(params: GetFavoriteTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getFavoriteTracksRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets a user\'s favorite tracks @@ -1002,6 +1601,100 @@ export class UsersApi extends runtime.BaseAPI { return await response.value(); } + /** + * @hidden + * Gets a list of users managed by the given user + */ + async getManagedUsersRaw(params: GetManagedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getManagedUsers.'); + } + + const queryParameters: any = {}; + + if (params.isApproved !== undefined) { + queryParameters['is_approved'] = params.isApproved; + } + + if (params.isRevoked !== undefined) { + queryParameters['is_revoked'] = params.isRevoked; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/managed_users`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUsersResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of users managed by the given user + */ + async getManagedUsers(params: GetManagedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getManagedUsersRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a list of users managing the given user + */ + async getManagersRaw(params: GetManagersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getManagers.'); + } + + const queryParameters: any = {}; + + if (params.isApproved !== undefined) { + queryParameters['is_approved'] = params.isApproved; + } + + if (params.isRevoked !== undefined) { + queryParameters['is_revoked'] = params.isRevoked; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/managers`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ManagersResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of users managing the given user + */ + async getManagers(params: GetManagersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getManagersRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Gets users muted by the given user @@ -1196,11 +1889,11 @@ export class UsersApi extends runtime.BaseAPI { /** * @hidden - * Gets a list of users that might be of interest to followers of this user. + * Gets the list of users who have purchased content by the given user */ - async getRelatedUsersRaw(params: GetRelatedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getPurchasersCountRaw(params: GetPurchasersCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getRelatedUsers.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getPurchasersCount.'); } const queryParameters: any = {}; @@ -1217,37 +1910,41 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - if (params.filterFollowed !== undefined) { - queryParameters['filter_followed'] = params.filterFollowed; + if (params.contentType !== undefined) { + queryParameters['content_type'] = params.contentType; + } + + if (params.contentId !== undefined) { + queryParameters['content_id'] = params.contentId; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/related`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/purchasers/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => RelatedArtistResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PurchasersCountResponseFromJSON(jsonValue)); } /** - * Gets a list of users that might be of interest to followers of this user. + * Gets the list of users who have purchased content by the given user */ - async getRelatedUsers(params: GetRelatedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getRelatedUsersRaw(params, initOverrides); + async getPurchasersCount(params: GetPurchasersCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getPurchasersCountRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the list of unique users who have remixed tracks by the given user, or a specific track by that user if provided + * Gets the purchases the user has made */ - async getRemixersRaw(params: GetRemixersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getPurchasesRaw(params: GetPurchasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getRemixers.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getPurchases.'); } const queryParameters: any = {}; @@ -1264,80 +1961,100 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - if (params.trackId !== undefined) { - queryParameters['track_id'] = params.trackId; + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; } - const headerParameters: runtime.HTTPHeaders = {}; + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.contentIds) { + queryParameters['content_ids'] = params.contentIds; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } const response = await this.request({ - path: `/users/{id}/remixers`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/purchases`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => RemixersResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PurchasesResponseFromJSON(jsonValue)); } /** - * Gets the list of unique users who have remixed tracks by the given user, or a specific track by that user if provided + * Gets the purchases the user has made */ - async getRemixers(params: GetRemixersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getRemixersRaw(params, initOverrides); + async getPurchases(params: GetPurchasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getPurchasesRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the given user\'s reposts + * Gets the count of purchases the user has made */ - async getRepostsRaw(params: GetRepostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getPurchasesCountRaw(params: GetPurchasesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getReposts.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getPurchasesCount.'); } const queryParameters: any = {}; - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; } - if (params.limit !== undefined) { - queryParameters['limit'] = params.limit; + if (params.contentIds) { + queryParameters['content_ids'] = params.contentIds; } - if (params.userId !== undefined) { - queryParameters['user_id'] = params.userId; + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); } - const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } const response = await this.request({ - path: `/users/{id}/reposts`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/purchases/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => RepostsFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PurchasesCountResponseFromJSON(jsonValue)); } /** - * Gets the given user\'s reposts + * Gets the count of purchases the user has made */ - async getReposts(params: GetRepostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getRepostsRaw(params, initOverrides); + async getPurchasesCount(params: GetPurchasesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getPurchasesCountRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the aggregated sales data for the user + * Gets a list of users that might be of interest to followers of this user. */ - async getSalesAggregateRaw(params: GetSalesAggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getRelatedUsersRaw(params: GetRelatedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSalesAggregate.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getRelatedUsers.'); } const queryParameters: any = {}; @@ -1354,41 +2071,37 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - const headerParameters: runtime.HTTPHeaders = {}; - - if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { - headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + if (params.filterFollowed !== undefined) { + queryParameters['filter_followed'] = params.filterFollowed; } - if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { - headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); - } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/sales/aggregate`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/related`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SalesAggregateResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => RelatedArtistResponseFromJSON(jsonValue)); } /** - * Gets the aggregated sales data for the user + * Gets a list of users that might be of interest to followers of this user. */ - async getSalesAggregate(params: GetSalesAggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSalesAggregateRaw(params, initOverrides); + async getRelatedUsers(params: GetRelatedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRelatedUsersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * All users that subscribe to the provided user + * Gets the list of unique users who have remixed tracks by the given user, or a specific track by that user if provided */ - async getSubscribersRaw(params: GetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getRemixersRaw(params: GetRemixersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSubscribers.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getRemixers.'); } const queryParameters: any = {}; @@ -1405,76 +2118,76 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } + if (params.trackId !== undefined) { + queryParameters['track_id'] = params.trackId; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/subscribers`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/remixers`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SubscribersResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => RemixersResponseFromJSON(jsonValue)); } /** - * All users that subscribe to the provided user + * Gets the list of unique users who have remixed tracks by the given user, or a specific track by that user if provided */ - async getSubscribers(params: GetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSubscribersRaw(params, initOverrides); + async getRemixers(params: GetRemixersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRemixersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the users that the given user supports + * Gets the count of unique users who have remixed tracks by the given user, or a specific track by that user if provided */ - async getSupportedUsersRaw(params: GetSupportedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getRemixersCountRaw(params: GetRemixersCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupportedUsers.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getRemixersCount.'); } const queryParameters: any = {}; - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; - } - - if (params.limit !== undefined) { - queryParameters['limit'] = params.limit; - } - if (params.userId !== undefined) { queryParameters['user_id'] = params.userId; } + if (params.trackId !== undefined) { + queryParameters['track_id'] = params.trackId; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/supporting`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/remixers/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportedUsersFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => RemixersCountResponseFromJSON(jsonValue)); } /** - * Gets the users that the given user supports + * Gets the count of unique users who have remixed tracks by the given user, or a specific track by that user if provided */ - async getSupportedUsers(params: GetSupportedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSupportedUsersRaw(params, initOverrides); + async getRemixersCount(params: GetRemixersCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRemixersCountRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the supporters of the given user + * Gets the given user\'s reposts */ - async getSupportersRaw(params: GetSupportersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getRepostsRaw(params: GetRepostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupporters.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getReposts.'); } const queryParameters: any = {}; @@ -1494,35 +2207,38 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/supporters`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/reposts`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportersFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => RepostsFromJSON(jsonValue)); } /** - * Gets the supporters of the given user + * Gets the given user\'s reposts */ - async getSupporters(params: GetSupportersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSupportersRaw(params, initOverrides); + async getReposts(params: GetRepostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRepostsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the most used track tags by a user. - * Fetch most used tags in a user\'s tracks + * Gets the user\'s reposts by the user handle */ - async getTopTrackTagsRaw(params: GetTopTrackTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getTopTrackTags.'); + async getRepostsByHandleRaw(params: GetRepostsByHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.handle === null || params.handle === undefined) { + throw new runtime.RequiredError('handle','Required parameter params.handle was null or undefined when calling getRepostsByHandle.'); } const queryParameters: any = {}; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + if (params.limit !== undefined) { queryParameters['limit'] = params.limit; } @@ -1534,31 +2250,30 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/tags`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/handle/{handle}/reposts`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TagsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => FullRepostsFromJSON(jsonValue)); } /** - * Gets the most used track tags by a user. - * Fetch most used tags in a user\'s tracks + * Gets the user\'s reposts by the user handle */ - async getTopTrackTags(params: GetTopTrackTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTopTrackTagsRaw(params, initOverrides); + async getRepostsByHandle(params: GetRepostsByHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRepostsByHandleRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the tracks created by a user using their user ID + * Gets the sales the user has made */ - async getTracksByUserRaw(params: GetTracksByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getSalesRaw(params: GetSalesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getTracksByUser.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSales.'); } const queryParameters: any = {}; @@ -1575,14 +2290,6 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - if (params.sort !== undefined) { - queryParameters['sort'] = params.sort; - } - - if (params.query !== undefined) { - queryParameters['query'] = params.query; - } - if (params.sortMethod !== undefined) { queryParameters['sort_method'] = params.sortMethod; } @@ -1591,12 +2298,8 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['sort_direction'] = params.sortDirection; } - if (params.filterTracks !== undefined) { - queryParameters['filter_tracks'] = params.filterTracks; - } - - if (params.gateCondition) { - queryParameters['gate_condition'] = params.gateCondition; + if (params.contentIds) { + queryParameters['content_ids'] = params.contentIds; } const headerParameters: runtime.HTTPHeaders = {}; @@ -1610,30 +2313,30 @@ export class UsersApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/users/{id}/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/sales`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PurchasesResponseFromJSON(jsonValue)); } /** - * Gets the tracks created by a user using their user ID + * Gets the sales the user has made */ - async getTracksByUser(params: GetTracksByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTracksByUserRaw(params, initOverrides); + async getSales(params: GetSalesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSalesRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the tracks created by a user using the user\'s handle + * Gets the aggregated sales data for the user */ - async getTracksByUserHandleRaw(params: GetTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.handle === null || params.handle === undefined) { - throw new runtime.RequiredError('handle','Required parameter params.handle was null or undefined when calling getTracksByUserHandle.'); + async getSalesAggregateRaw(params: GetSalesAggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSalesAggregate.'); } const queryParameters: any = {}; @@ -1650,26 +2353,6 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - if (params.sort !== undefined) { - queryParameters['sort'] = params.sort; - } - - if (params.query !== undefined) { - queryParameters['query'] = params.query; - } - - if (params.sortMethod !== undefined) { - queryParameters['sort_method'] = params.sortMethod; - } - - if (params.sortDirection !== undefined) { - queryParameters['sort_direction'] = params.sortDirection; - } - - if (params.filterTracks !== undefined) { - queryParameters['filter_tracks'] = params.filterTracks; - } - const headerParameters: runtime.HTTPHeaders = {}; if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { @@ -1681,30 +2364,30 @@ export class UsersApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/users/handle/{handle}/tracks`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), + path: `/users/{id}/sales/aggregate`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => SalesAggregateResponseFromJSON(jsonValue)); } /** - * Gets the tracks created by a user using the user\'s handle + * Gets the aggregated sales data for the user */ - async getTracksByUserHandle(params: GetTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTracksByUserHandleRaw(params, initOverrides); + async getSalesAggregate(params: GetSalesAggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSalesAggregateRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the count of tracks created by a user + * Gets the count of sales the user has made */ - async getTracksCountByUserRaw(params: GetTracksCountByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getSalesCountRaw(params: GetSalesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getTracksCountByUser.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSalesCount.'); } const queryParameters: any = {}; @@ -1713,12 +2396,8 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - if (params.filterTracks !== undefined) { - queryParameters['filter_tracks'] = params.filterTracks; - } - - if (params.gateCondition) { - queryParameters['gate_condition'] = params.gateCondition; + if (params.contentIds) { + queryParameters['content_ids'] = params.contentIds; } const headerParameters: runtime.HTTPHeaders = {}; @@ -1732,34 +2411,42 @@ export class UsersApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/users/{id}/tracks/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/sales/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksCountResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PurchasesCountResponseFromJSON(jsonValue)); } /** - * Gets the count of tracks created by a user + * Gets the count of sales the user has made */ - async getTracksCountByUser(params: GetTracksCountByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTracksCountByUserRaw(params, initOverrides); + async getSalesCount(params: GetSalesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSalesCountRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets a single user by their user ID + * All users that subscribe to the provided user */ - async getUserRaw(params: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getSubscribersRaw(params: GetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUser.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSubscribers.'); } const queryParameters: any = {}; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + if (params.userId !== undefined) { queryParameters['user_id'] = params.userId; } @@ -1767,44 +2454,40 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/subscribers`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => SubscribersResponseFromJSON(jsonValue)); } /** - * Gets a single user by their user ID + * All users that subscribe to the provided user */ - async getUser(params: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserRaw(params, initOverrides); + async getSubscribers(params: GetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSubscribersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the user\'s historical portfolio balance data + * Gets the users that the given user supports */ - async getUserBalanceHistoryRaw(params: GetUserBalanceHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getSupportedUsersRaw(params: GetSupportedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserBalanceHistory.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupportedUsers.'); } const queryParameters: any = {}; - if (params.startTime !== undefined) { - queryParameters['start_time'] = (params.startTime as any).toISOString(); - } - - if (params.endTime !== undefined) { - queryParameters['end_time'] = (params.endTime as any).toISOString(); + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; } - if (params.granularity !== undefined) { - queryParameters['granularity'] = params.granularity; + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; } if (params.userId !== undefined) { @@ -1813,39 +2496,35 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { - headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); - } - - if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { - headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); - } - const response = await this.request({ - path: `/users/{id}/balance/history`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/supporting`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => BalanceHistoryResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportedUsersFromJSON(jsonValue)); } /** - * Get the user\'s historical portfolio balance data + * Gets the users that the given user supports */ - async getUserBalanceHistory(params: GetUserBalanceHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserBalanceHistoryRaw(params, initOverrides); + async getSupportedUsers(params: GetSupportedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupportedUsersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets a single user by their handle + * Gets the specified supporter of the given user */ - async getUserByHandleRaw(params: GetUserByHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.handle === null || params.handle === undefined) { - throw new runtime.RequiredError('handle','Required parameter params.handle was null or undefined when calling getUserByHandle.'); + async getSupporterRaw(params: GetSupporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupporter.'); + } + + if (params.supporterUserId === null || params.supporterUserId === undefined) { + throw new runtime.RequiredError('supporterUserId','Required parameter params.supporterUserId was null or undefined when calling getSupporter.'); } const queryParameters: any = {}; @@ -1857,172 +2536,151 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/handle/{handle}`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), + path: `/users/{id}/supporters/{supporter_user_id}`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))).replace(`{${"supporter_user_id"}}`, encodeURIComponent(String(params.supporterUserId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => FullGetSupporterFromJSON(jsonValue)); } /** - * Gets a single user by their handle + * Gets the specified supporter of the given user */ - async getUserByHandle(params: GetUserByHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserByHandleRaw(params, initOverrides); + async getSupporter(params: GetSupporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupporterRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets all challenges for the given user + * Gets the supporters of the given user */ - async getUserChallengesRaw(params: GetUserChallengesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getSupportersRaw(params: GetSupportersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserChallenges.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupporters.'); } const queryParameters: any = {}; - if (params.showHistorical !== undefined) { - queryParameters['show_historical'] = params.showHistorical; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/challenges`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/supporters`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GetChallengesFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportersFromJSON(jsonValue)); } /** - * Gets all challenges for the given user + * Gets the supporters of the given user */ - async getUserChallenges(params: GetUserChallengesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserChallengesRaw(params, initOverrides); + async getSupporters(params: GetSupportersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupportersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets information about a specific coin owned by the user and their wallets + * Gets the support from the given user to the supported user */ - async getUserCoinRaw(params: GetUserCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getSupportingRaw(params: GetSupportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserCoin.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupporting.'); } - if (params.mint === null || params.mint === undefined) { - throw new runtime.RequiredError('mint','Required parameter params.mint was null or undefined when calling getUserCoin.'); + if (params.supportedUserId === null || params.supportedUserId === undefined) { + throw new runtime.RequiredError('supportedUserId','Required parameter params.supportedUserId was null or undefined when calling getSupporting.'); } const queryParameters: any = {}; + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/coins/{mint}`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))).replace(`{${"mint"}}`, encodeURIComponent(String(params.mint))), + path: `/users/{id}/supporting/{supported_user_id}`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))).replace(`{${"supported_user_id"}}`, encodeURIComponent(String(params.supportedUserId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserCoinResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => FullGetSupportingFromJSON(jsonValue)); } /** - * Gets information about a specific coin owned by the user and their wallets + * Gets the support from the given user to the supported user */ - async getUserCoin(params: GetUserCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCoinRaw(params, initOverrides); + async getSupporting(params: GetSupportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupportingRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets a list of the coins owned by the user and their balances + * Gets the most used track tags by a user. + * Fetch most used tags in a user\'s tracks */ - async getUserCoinsRaw(params: GetUserCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getTopTrackTagsRaw(params: GetTopTrackTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserCoins.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getTopTrackTags.'); } const queryParameters: any = {}; - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; - } - if (params.limit !== undefined) { queryParameters['limit'] = params.limit; } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/users/{id}/coins`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserCoinsResponseFromJSON(jsonValue)); - } - - /** - * Gets a list of the coins owned by the user and their balances - */ - async getUserCoins(params: GetUserCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCoinsRaw(params, initOverrides); - return await response.value(); - } - - /** - * @hidden - * Get the User\'s indexed collectibles data - */ - async getUserCollectiblesRaw(params: GetUserCollectiblesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserCollectibles.'); + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/collectibles`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/tags`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => CollectiblesResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TagsResponseFromJSON(jsonValue)); } /** - * Get the User\'s indexed collectibles data + * Gets the most used track tags by a user. + * Fetch most used tags in a user\'s tracks */ - async getUserCollectibles(params: GetUserCollectiblesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCollectiblesRaw(params, initOverrides); + async getTopTrackTags(params: GetTopTrackTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopTrackTagsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get user comment history + * Get the Top Users having at least one track by follower count */ - async getUserCommentsRaw(params: GetUserCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserComments.'); - } - + async getTopUsersRaw(params: GetTopUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; if (params.offset !== undefined) { @@ -2040,147 +2698,144 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/comments`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/top`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserCommentsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TopUsersResponseFullFromJSON(jsonValue)); } /** - * Get user comment history + * Get the Top Users having at least one track by follower count */ - async getUserComments(params: GetUserCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCommentsRaw(params, initOverrides); + async getTopUsers(params: GetTopUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopUsersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the encrypted key for email access between the receiving user and granting user. + * Get the Top Users for a Given Genre */ - async getUserEmailKeyRaw(params: GetUserEmailKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.receivingUserId === null || params.receivingUserId === undefined) { - throw new runtime.RequiredError('receivingUserId','Required parameter params.receivingUserId was null or undefined when calling getUserEmailKey.'); + async getTopUsersInGenreRaw(params: GetTopUsersInGenreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; } - if (params.grantorUserId === null || params.grantorUserId === undefined) { - throw new runtime.RequiredError('grantorUserId','Required parameter params.grantorUserId was null or undefined when calling getUserEmailKey.'); + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; } - const queryParameters: any = {}; + if (params.genre) { + queryParameters['genre'] = params.genre; + } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{receiving_user_id}/emails/{grantor_user_id}/key`.replace(`{${"receiving_user_id"}}`, encodeURIComponent(String(params.receivingUserId))).replace(`{${"grantor_user_id"}}`, encodeURIComponent(String(params.grantorUserId))), + path: `/users/genre/top`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => EmailAccessResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TopGenreUsersResponseFullFromJSON(jsonValue)); } /** - * Gets the encrypted key for email access between the receiving user and granting user. + * Get the Top Users for a Given Genre */ - async getUserEmailKey(params: GetUserEmailKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserEmailKeyRaw(params, initOverrides); + async getTopUsersInGenre(params: GetTopUsersInGenreRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopUsersInGenreRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets User IDs from any Ethereum wallet address or Solana account address associated with their Audius account. + * Gets the tracks created by a user using their user ID */ - async getUserIDsByAddressesRaw(params: GetUserIDsByAddressesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.address === null || params.address === undefined) { - throw new runtime.RequiredError('address','Required parameter params.address was null or undefined when calling getUserIDsByAddresses.'); + async getTracksByUserRaw(params: GetTracksByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getTracksByUser.'); } const queryParameters: any = {}; - if (params.address) { - queryParameters['address'] = params.address; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/users/address`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserIdsAddressesResponseFromJSON(jsonValue)); - } + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } - /** - * Gets User IDs from any Ethereum wallet address or Solana account address associated with their Audius account. - */ - async getUserIDsByAddresses(params: GetUserIDsByAddressesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserIDsByAddressesRaw(params, initOverrides); - return await response.value(); - } + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } - /** - * @hidden - * Gets the listen data for a user by month and track within a given time frame. - */ - async getUserMonthlyTrackListensRaw(params: GetUserMonthlyTrackListensRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserMonthlyTrackListens.'); + if (params.sort !== undefined) { + queryParameters['sort'] = params.sort; } - if (params.startTime === null || params.startTime === undefined) { - throw new runtime.RequiredError('startTime','Required parameter params.startTime was null or undefined when calling getUserMonthlyTrackListens.'); + if (params.query !== undefined) { + queryParameters['query'] = params.query; } - if (params.endTime === null || params.endTime === undefined) { - throw new runtime.RequiredError('endTime','Required parameter params.endTime was null or undefined when calling getUserMonthlyTrackListens.'); + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; } - const queryParameters: any = {}; + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } - if (params.startTime !== undefined) { - queryParameters['start_time'] = params.startTime; + if (params.filterTracks !== undefined) { + queryParameters['filter_tracks'] = params.filterTracks; } - if (params.endTime !== undefined) { - queryParameters['end_time'] = params.endTime; + if (params.gateCondition) { + queryParameters['gate_condition'] = params.gateCondition; } const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ - path: `/users/{id}/listen_counts_monthly`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserTrackListenCountsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); } /** - * Gets the listen data for a user by month and track within a given time frame. + * Gets the tracks created by a user using their user ID */ - async getUserMonthlyTrackListens(params: GetUserMonthlyTrackListensRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserMonthlyTrackListensRaw(params, initOverrides); + async getTracksByUser(params: GetTracksByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTracksByUserRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the recommended tracks for the user + * Gets the tracks created by a user using the user\'s handle */ - async getUserRecommendedTracksRaw(params: GetUserRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserRecommendedTracks.'); + async getTracksByUserHandleRaw(params: GetTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.handle === null || params.handle === undefined) { + throw new runtime.RequiredError('handle','Required parameter params.handle was null or undefined when calling getTracksByUserHandle.'); } const queryParameters: any = {}; @@ -2197,184 +2852,1355 @@ export class UsersApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - if (params.timeRange !== undefined) { - queryParameters['time_range'] = params.timeRange; + if (params.sort !== undefined) { + queryParameters['sort'] = params.sort; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.filterTracks !== undefined) { + queryParameters['filter_tracks'] = params.filterTracks; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/handle/{handle}/tracks`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + } + + /** + * Gets the tracks created by a user using the user\'s handle + */ + async getTracksByUserHandle(params: GetTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTracksByUserHandleRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the count of tracks created by a user + */ + async getTracksCountByUserRaw(params: GetTracksCountByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getTracksCountByUser.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.filterTracks !== undefined) { + queryParameters['filter_tracks'] = params.filterTracks; + } + + if (params.gateCondition) { + queryParameters['gate_condition'] = params.gateCondition; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/tracks/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TracksCountResponseFromJSON(jsonValue)); + } + + /** + * Gets the count of tracks created by a user + */ + async getTracksCountByUser(params: GetTracksCountByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTracksCountByUserRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the count of the user\'s $USDC transaction history within the App + */ + async getUSDCTransactionCountRaw(params: GetUSDCTransactionCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUSDCTransactionCount.'); + } + + const queryParameters: any = {}; + + if (params.type) { + queryParameters['type'] = params.type; + } + + if (params.includeSystemTransactions !== undefined) { + queryParameters['include_system_transactions'] = params.includeSystemTransactions; + } + + if (params.method !== undefined) { + queryParameters['method'] = params.method; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/transactions/usdc/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryCountResponseFromJSON(jsonValue)); + } + + /** + * Gets the count of the user\'s $USDC transaction history within the App + */ + async getUSDCTransactionCount(params: GetUSDCTransactionCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUSDCTransactionCountRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the user\'s $USDC transaction history within the App + */ + async getUSDCTransactionsRaw(params: GetUSDCTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUSDCTransactions.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.type) { + queryParameters['type'] = params.type; + } + + if (params.includeSystemTransactions !== undefined) { + queryParameters['include_system_transactions'] = params.includeSystemTransactions; + } + + if (params.method !== undefined) { + queryParameters['method'] = params.method; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/transactions/usdc`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryResponseFromJSON(jsonValue)); + } + + /** + * Gets the user\'s $USDC transaction history within the App + */ + async getUSDCTransactions(params: GetUSDCTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUSDCTransactionsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a single user by their user ID + */ + async getUserRaw(params: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUser.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue)); + } + + /** + * Gets a single user by their user ID + */ + async getUser(params: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the account for a given user + */ + async getUserAccountRaw(params: GetUserAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.wallet === null || params.wallet === undefined) { + throw new runtime.RequiredError('wallet','Required parameter params.wallet was null or undefined when calling getUserAccount.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/account/{wallet}`.replace(`{${"wallet"}}`, encodeURIComponent(String(params.wallet))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserAccountResponseFullFromJSON(jsonValue)); + } + + /** + * Gets the account for a given user + */ + async getUserAccount(params: GetUserAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserAccountRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the user\'s historical portfolio balance data + */ + async getUserBalanceHistoryRaw(params: GetUserBalanceHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserBalanceHistory.'); + } + + const queryParameters: any = {}; + + if (params.startTime !== undefined) { + queryParameters['start_time'] = (params.startTime as any).toISOString(); + } + + if (params.endTime !== undefined) { + queryParameters['end_time'] = (params.endTime as any).toISOString(); + } + + if (params.granularity !== undefined) { + queryParameters['granularity'] = params.granularity; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/balance/history`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BalanceHistoryResponseFromJSON(jsonValue)); + } + + /** + * Get the user\'s historical portfolio balance data + */ + async getUserBalanceHistory(params: GetUserBalanceHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserBalanceHistoryRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a single user by their handle + */ + async getUserByHandleRaw(params: GetUserByHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.handle === null || params.handle === undefined) { + throw new runtime.RequiredError('handle','Required parameter params.handle was null or undefined when calling getUserByHandle.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/handle/{handle}`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue)); + } + + /** + * Gets a single user by their handle + */ + async getUserByHandle(params: GetUserByHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserByHandleRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets all challenges for the given user + */ + async getUserChallengesRaw(params: GetUserChallengesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserChallenges.'); + } + + const queryParameters: any = {}; + + if (params.showHistorical !== undefined) { + queryParameters['show_historical'] = params.showHistorical; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/challenges`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetChallengesFromJSON(jsonValue)); + } + + /** + * Gets all challenges for the given user + */ + async getUserChallenges(params: GetUserChallengesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserChallengesRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets information about a specific coin owned by the user and their wallets + */ + async getUserCoinRaw(params: GetUserCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserCoin.'); + } + + if (params.mint === null || params.mint === undefined) { + throw new runtime.RequiredError('mint','Required parameter params.mint was null or undefined when calling getUserCoin.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/coins/{mint}`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))).replace(`{${"mint"}}`, encodeURIComponent(String(params.mint))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserCoinResponseFromJSON(jsonValue)); + } + + /** + * Gets information about a specific coin owned by the user and their wallets + */ + async getUserCoin(params: GetUserCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserCoinRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a list of the coins owned by the user and their balances + */ + async getUserCoinsRaw(params: GetUserCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserCoins.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/coins`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserCoinsResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of the coins owned by the user and their balances + */ + async getUserCoins(params: GetUserCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserCoinsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the User\'s indexed collectibles data + */ + async getUserCollectiblesRaw(params: GetUserCollectiblesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserCollectibles.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/collectibles`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CollectiblesResponseFromJSON(jsonValue)); + } + + /** + * Get the User\'s indexed collectibles data + */ + async getUserCollectibles(params: GetUserCollectiblesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserCollectiblesRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get user comment history + */ + async getUserCommentsRaw(params: GetUserCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserComments.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/comments`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserCommentsResponseFromJSON(jsonValue)); + } + + /** + * Get user comment history + */ + async getUserComments(params: GetUserCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserCommentsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the encrypted key for email access between the receiving user and granting user. + */ + async getUserEmailKeyRaw(params: GetUserEmailKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.receivingUserId === null || params.receivingUserId === undefined) { + throw new runtime.RequiredError('receivingUserId','Required parameter params.receivingUserId was null or undefined when calling getUserEmailKey.'); + } + + if (params.grantorUserId === null || params.grantorUserId === undefined) { + throw new runtime.RequiredError('grantorUserId','Required parameter params.grantorUserId was null or undefined when calling getUserEmailKey.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{receiving_user_id}/emails/{grantor_user_id}/key`.replace(`{${"receiving_user_id"}}`, encodeURIComponent(String(params.receivingUserId))).replace(`{${"grantor_user_id"}}`, encodeURIComponent(String(params.grantorUserId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailAccessResponseFromJSON(jsonValue)); + } + + /** + * Gets the encrypted key for email access between the receiving user and granting user. + */ + async getUserEmailKey(params: GetUserEmailKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserEmailKeyRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the feed for the user + */ + async getUserFeedRaw(params: GetUserFeedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserFeed.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.filter !== undefined) { + queryParameters['filter'] = params.filter; + } + + if (params.tracksOnly !== undefined) { + queryParameters['tracks_only'] = params.tracksOnly; + } + + if (params.withUsers !== undefined) { + queryParameters['with_users'] = params.withUsers; + } + + if (params.followeeUserId) { + queryParameters['followee_user_id'] = params.followeeUserId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/feed`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFeedResponseFromJSON(jsonValue)); + } + + /** + * Gets the feed for the user + */ + async getUserFeed(params: GetUserFeedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserFeedRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets User IDs from any Ethereum wallet address or Solana account address associated with their Audius account. + */ + async getUserIDsByAddressesRaw(params: GetUserIDsByAddressesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.address === null || params.address === undefined) { + throw new runtime.RequiredError('address','Required parameter params.address was null or undefined when calling getUserIDsByAddresses.'); + } + + const queryParameters: any = {}; + + if (params.address) { + queryParameters['address'] = params.address; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/address`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserIdsAddressesResponseFromJSON(jsonValue)); + } + + /** + * Gets User IDs from any Ethereum wallet address or Solana account address associated with their Audius account. + */ + async getUserIDsByAddresses(params: GetUserIDsByAddressesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserIDsByAddressesRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a user\'s saved/reposted/purchased/all albums + * Fetch a user\'s full library playlists + */ + async getUserLibraryAlbumsRaw(params: GetUserLibraryAlbumsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserLibraryAlbums.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.type !== undefined) { + queryParameters['type'] = params.type; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/library/albums`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CollectionLibraryResponseFullFromJSON(jsonValue)); + } + + /** + * Gets a user\'s saved/reposted/purchased/all albums + * Fetch a user\'s full library playlists + */ + async getUserLibraryAlbums(params: GetUserLibraryAlbumsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryAlbumsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a user\'s saved/reposted/purchased/all playlists + * Fetch a user\'s full library playlists + */ + async getUserLibraryPlaylistsRaw(params: GetUserLibraryPlaylistsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserLibraryPlaylists.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.type !== undefined) { + queryParameters['type'] = params.type; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/library/playlists`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CollectionLibraryResponseFullFromJSON(jsonValue)); + } + + /** + * Gets a user\'s saved/reposted/purchased/all playlists + * Fetch a user\'s full library playlists + */ + async getUserLibraryPlaylists(params: GetUserLibraryPlaylistsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryPlaylistsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a user\'s saved/reposted/purchased/all tracks + * Fetch a user\'s full library tracks + */ + async getUserLibraryTracksRaw(params: GetUserLibraryTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserLibraryTracks.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.type !== undefined) { + queryParameters['type'] = params.type; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/library/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrackLibraryResponseFullFromJSON(jsonValue)); + } + + /** + * Gets a user\'s saved/reposted/purchased/all tracks + * Fetch a user\'s full library tracks + */ + async getUserLibraryTracks(params: GetUserLibraryTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryTracksRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the listen data for a user by month and track within a given time frame. + */ + async getUserMonthlyTrackListensRaw(params: GetUserMonthlyTrackListensRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserMonthlyTrackListens.'); + } + + if (params.startTime === null || params.startTime === undefined) { + throw new runtime.RequiredError('startTime','Required parameter params.startTime was null or undefined when calling getUserMonthlyTrackListens.'); + } + + if (params.endTime === null || params.endTime === undefined) { + throw new runtime.RequiredError('endTime','Required parameter params.endTime was null or undefined when calling getUserMonthlyTrackListens.'); + } + + const queryParameters: any = {}; + + if (params.startTime !== undefined) { + queryParameters['start_time'] = params.startTime; + } + + if (params.endTime !== undefined) { + queryParameters['end_time'] = params.endTime; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/listen_counts_monthly`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserTrackListenCountsResponseFromJSON(jsonValue)); + } + + /** + * Gets the listen data for a user by month and track within a given time frame. + */ + async getUserMonthlyTrackListens(params: GetUserMonthlyTrackListensRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserMonthlyTrackListensRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the recommended tracks for the user + */ + async getUserRecommendedTracksRaw(params: GetUserRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserRecommendedTracks.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.timeRange !== undefined) { + queryParameters['time_range'] = params.timeRange; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/recommended-tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + } + + /** + * Gets the recommended tracks for the user + */ + async getUserRecommendedTracks(params: GetUserRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserRecommendedTracksRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets tracks owned by the user which have been remixed by another track + */ + async getUserTracksRemixedRaw(params: GetUserTracksRemixedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserTracksRemixed.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/tracks/remixed`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserTracksRemixedResponseFromJSON(jsonValue)); + } + + /** + * Gets tracks owned by the user which have been remixed by another track + */ + async getUserTracksRemixed(params: GetUserTracksRemixedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserTracksRemixedRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the tracks the user recently listened to. + */ + async getUsersTrackHistoryRaw(params: GetUsersTrackHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUsersTrackHistory.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/history/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HistoryResponseFromJSON(jsonValue)); + } + + /** + * Get the tracks the user recently listened to. + */ + async getUsersTrackHistory(params: GetUsersTrackHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUsersTrackHistoryRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Mute a user + */ + async muteUserRaw(params: MuteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling muteUser.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/muted`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } + + /** + * Mute a user + */ + async muteUser(params: MuteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.muteUserRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Search for users that match the given query + */ + async searchUsersRaw(params: SearchUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.genre) { + queryParameters['genre'] = params.genre; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.isVerified !== undefined) { + queryParameters['is_verified'] = params.isVerified; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/search`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSearchFromJSON(jsonValue)); + } + + /** + * Search for users that match the given query + */ + async searchUsers(params: SearchUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.searchUsersRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Subscribe to a user + */ + async subscribeToUserRaw(params: SubscribeToUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling subscribeToUser.'); } + const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/recommended-tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), - method: 'GET', + path: `/users/{id}/subscribers`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); } /** - * Gets the recommended tracks for the user + * Subscribe to a user */ - async getUserRecommendedTracks(params: GetUserRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserRecommendedTracksRaw(params, initOverrides); + async subscribeToUser(params: SubscribeToUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.subscribeToUserRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets tracks owned by the user which have been remixed by another track + * Unfollow a user */ - async getUserTracksRemixedRaw(params: GetUserTracksRemixedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async unfollowUserRaw(params: UnfollowUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserTracksRemixed.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling unfollowUser.'); } const queryParameters: any = {}; - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; - } - - if (params.limit !== undefined) { - queryParameters['limit'] = params.limit; - } - - if (params.userId !== undefined) { - queryParameters['user_id'] = params.userId; - } - const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/tracks/remixed`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), - method: 'GET', + path: `/users/{id}/follow`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserTracksRemixedResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); } /** - * Gets tracks owned by the user which have been remixed by another track + * Unfollow a user */ - async getUserTracksRemixed(params: GetUserTracksRemixedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserTracksRemixedRaw(params, initOverrides); + async unfollowUser(params: UnfollowUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unfollowUserRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the tracks the user recently listened to. + * Unmute a user */ - async getUsersTrackHistoryRaw(params: GetUsersTrackHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async unmuteUserRaw(params: UnmuteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.id === null || params.id === undefined) { - throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUsersTrackHistory.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling unmuteUser.'); } const queryParameters: any = {}; - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (params.limit !== undefined) { - queryParameters['limit'] = params.limit; - } + const response = await this.request({ + path: `/users/{id}/muted`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - if (params.query !== undefined) { - queryParameters['query'] = params.query; - } + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); + } - if (params.sortMethod !== undefined) { - queryParameters['sort_method'] = params.sortMethod; - } + /** + * Unmute a user + */ + async unmuteUser(params: UnmuteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unmuteUserRaw(params, initOverrides); + return await response.value(); + } - if (params.sortDirection !== undefined) { - queryParameters['sort_direction'] = params.sortDirection; + /** + * @hidden + * Unsubscribe from a user + */ + async unsubscribeFromUserRaw(params: UnsubscribeFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling unsubscribeFromUser.'); } - if (params.userId !== undefined) { - queryParameters['user_id'] = params.userId; - } + const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; - if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { - headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); - } - - if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { - headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); - } - const response = await this.request({ - path: `/users/{id}/history/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), - method: 'GET', + path: `/users/{id}/subscribers`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => HistoryResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); } /** - * Get the tracks the user recently listened to. + * Unsubscribe from a user */ - async getUsersTrackHistory(params: GetUsersTrackHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUsersTrackHistoryRaw(params, initOverrides); + async unsubscribeFromUser(params: UnsubscribeFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.unsubscribeFromUserRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Search for users that match the given query + * Updates an existing user profile */ - async searchUsersRaw(params: SearchUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; - } - - if (params.limit !== undefined) { - queryParameters['limit'] = params.limit; - } - - if (params.query !== undefined) { - queryParameters['query'] = params.query; - } - - if (params.genre) { - queryParameters['genre'] = params.genre; + async updateUserRaw(params: UpdateUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling updateUser.'); } - if (params.sortMethod !== undefined) { - queryParameters['sort_method'] = params.sortMethod; + if (params.updateUserRequest === null || params.updateUserRequest === undefined) { + throw new runtime.RequiredError('updateUserRequest','Required parameter params.updateUserRequest was null or undefined when calling updateUser.'); } - if (params.isVerified !== undefined) { - queryParameters['is_verified'] = params.isVerified; - } + const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + const response = await this.request({ - path: `/users/search`, - method: 'GET', + path: `/users/{id}/albums`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'PUT', headers: headerParameters, query: queryParameters, + body: UpdateUserRequestToJSON(params.updateUserRequest), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserSearchFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => CreateComment201ResponseFromJSON(jsonValue)); } /** - * Search for users that match the given query + * Updates an existing user profile */ - async searchUsers(params: SearchUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.searchUsersRaw(params, initOverrides); + async updateUser(params: UpdateUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateUserRaw(params, initOverrides); return await response.value(); } @@ -2462,6 +4288,45 @@ export const GetAlbumsByUserSortMethodEnum = { Popular: 'popular' } as const; export type GetAlbumsByUserSortMethodEnum = typeof GetAlbumsByUserSortMethodEnum[keyof typeof GetAlbumsByUserSortMethodEnum]; +/** + * @export + */ +export const GetAudioTransactionsSortMethodEnum = { + Date: 'date', + TransactionType: 'transaction_type' +} as const; +export type GetAudioTransactionsSortMethodEnum = typeof GetAudioTransactionsSortMethodEnum[keyof typeof GetAudioTransactionsSortMethodEnum]; +/** + * @export + */ +export const GetAudioTransactionsSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetAudioTransactionsSortDirectionEnum = typeof GetAudioTransactionsSortDirectionEnum[keyof typeof GetAudioTransactionsSortDirectionEnum]; +/** + * @export + */ +export const GetFavoriteTracksSortMethodEnum = { + Title: 'title', + ArtistName: 'artist_name', + ReleaseDate: 'release_date', + LastListenDate: 'last_listen_date', + AddedDate: 'added_date', + Plays: 'plays', + Reposts: 'reposts', + Saves: 'saves', + MostListensByUser: 'most_listens_by_user' +} as const; +export type GetFavoriteTracksSortMethodEnum = typeof GetFavoriteTracksSortMethodEnum[keyof typeof GetFavoriteTracksSortMethodEnum]; +/** + * @export + */ +export const GetFavoriteTracksSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetFavoriteTracksSortDirectionEnum = typeof GetFavoriteTracksSortDirectionEnum[keyof typeof GetFavoriteTracksSortDirectionEnum]; /** * @export */ @@ -2470,6 +4335,42 @@ export const GetPlaylistsByUserSortMethodEnum = { Popular: 'popular' } as const; export type GetPlaylistsByUserSortMethodEnum = typeof GetPlaylistsByUserSortMethodEnum[keyof typeof GetPlaylistsByUserSortMethodEnum]; +/** + * @export + */ +export const GetPurchasesSortMethodEnum = { + ContentTitle: 'content_title', + ArtistName: 'artist_name', + BuyerName: 'buyer_name', + Date: 'date' +} as const; +export type GetPurchasesSortMethodEnum = typeof GetPurchasesSortMethodEnum[keyof typeof GetPurchasesSortMethodEnum]; +/** + * @export + */ +export const GetPurchasesSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetPurchasesSortDirectionEnum = typeof GetPurchasesSortDirectionEnum[keyof typeof GetPurchasesSortDirectionEnum]; +/** + * @export + */ +export const GetSalesSortMethodEnum = { + ContentTitle: 'content_title', + ArtistName: 'artist_name', + BuyerName: 'buyer_name', + Date: 'date' +} as const; +export type GetSalesSortMethodEnum = typeof GetSalesSortMethodEnum[keyof typeof GetSalesSortMethodEnum]; +/** + * @export + */ +export const GetSalesSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetSalesSortDirectionEnum = typeof GetSalesSortDirectionEnum[keyof typeof GetSalesSortDirectionEnum]; /** * @export */ @@ -2580,6 +4481,64 @@ export const GetTracksCountByUserGateConditionEnum = { Token: 'token' } as const; export type GetTracksCountByUserGateConditionEnum = typeof GetTracksCountByUserGateConditionEnum[keyof typeof GetTracksCountByUserGateConditionEnum]; +/** + * @export + */ +export const GetUSDCTransactionCountTypeEnum = { + PurchaseContent: 'purchase_content', + Transfer: 'transfer', + InternalTransfer: 'internal_transfer', + PrepareWithdrawal: 'prepare_withdrawal', + RecoverWithdrawal: 'recover_withdrawal', + Withdrawal: 'withdrawal', + PurchaseStripe: 'purchase_stripe' +} as const; +export type GetUSDCTransactionCountTypeEnum = typeof GetUSDCTransactionCountTypeEnum[keyof typeof GetUSDCTransactionCountTypeEnum]; +/** + * @export + */ +export const GetUSDCTransactionCountMethodEnum = { + Send: 'send', + Receive: 'receive' +} as const; +export type GetUSDCTransactionCountMethodEnum = typeof GetUSDCTransactionCountMethodEnum[keyof typeof GetUSDCTransactionCountMethodEnum]; +/** + * @export + */ +export const GetUSDCTransactionsSortMethodEnum = { + Date: 'date', + TransactionType: 'transaction_type' +} as const; +export type GetUSDCTransactionsSortMethodEnum = typeof GetUSDCTransactionsSortMethodEnum[keyof typeof GetUSDCTransactionsSortMethodEnum]; +/** + * @export + */ +export const GetUSDCTransactionsSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetUSDCTransactionsSortDirectionEnum = typeof GetUSDCTransactionsSortDirectionEnum[keyof typeof GetUSDCTransactionsSortDirectionEnum]; +/** + * @export + */ +export const GetUSDCTransactionsTypeEnum = { + PurchaseContent: 'purchase_content', + Transfer: 'transfer', + InternalTransfer: 'internal_transfer', + PrepareWithdrawal: 'prepare_withdrawal', + RecoverWithdrawal: 'recover_withdrawal', + Withdrawal: 'withdrawal', + PurchaseStripe: 'purchase_stripe' +} as const; +export type GetUSDCTransactionsTypeEnum = typeof GetUSDCTransactionsTypeEnum[keyof typeof GetUSDCTransactionsTypeEnum]; +/** + * @export + */ +export const GetUSDCTransactionsMethodEnum = { + Send: 'send', + Receive: 'receive' +} as const; +export type GetUSDCTransactionsMethodEnum = typeof GetUSDCTransactionsMethodEnum[keyof typeof GetUSDCTransactionsMethodEnum]; /** * @export */ @@ -2588,6 +4547,102 @@ export const GetUserBalanceHistoryGranularityEnum = { Daily: 'daily' } as const; export type GetUserBalanceHistoryGranularityEnum = typeof GetUserBalanceHistoryGranularityEnum[keyof typeof GetUserBalanceHistoryGranularityEnum]; +/** + * @export + */ +export const GetUserFeedFilterEnum = { + All: 'all', + Repost: 'repost', + Original: 'original' +} as const; +export type GetUserFeedFilterEnum = typeof GetUserFeedFilterEnum[keyof typeof GetUserFeedFilterEnum]; +/** + * @export + */ +export const GetUserLibraryAlbumsSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetUserLibraryAlbumsSortDirectionEnum = typeof GetUserLibraryAlbumsSortDirectionEnum[keyof typeof GetUserLibraryAlbumsSortDirectionEnum]; +/** + * @export + */ +export const GetUserLibraryAlbumsTypeEnum = { + All: 'all', + Repost: 'repost', + Favorite: 'favorite', + Purchase: 'purchase' +} as const; +export type GetUserLibraryAlbumsTypeEnum = typeof GetUserLibraryAlbumsTypeEnum[keyof typeof GetUserLibraryAlbumsTypeEnum]; +/** + * @export + */ +export const GetUserLibraryAlbumsSortMethodEnum = { + AddedDate: 'added_date', + Reposts: 'reposts', + Saves: 'saves' +} as const; +export type GetUserLibraryAlbumsSortMethodEnum = typeof GetUserLibraryAlbumsSortMethodEnum[keyof typeof GetUserLibraryAlbumsSortMethodEnum]; +/** + * @export + */ +export const GetUserLibraryPlaylistsSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetUserLibraryPlaylistsSortDirectionEnum = typeof GetUserLibraryPlaylistsSortDirectionEnum[keyof typeof GetUserLibraryPlaylistsSortDirectionEnum]; +/** + * @export + */ +export const GetUserLibraryPlaylistsTypeEnum = { + All: 'all', + Repost: 'repost', + Favorite: 'favorite', + Purchase: 'purchase' +} as const; +export type GetUserLibraryPlaylistsTypeEnum = typeof GetUserLibraryPlaylistsTypeEnum[keyof typeof GetUserLibraryPlaylistsTypeEnum]; +/** + * @export + */ +export const GetUserLibraryPlaylistsSortMethodEnum = { + AddedDate: 'added_date', + Reposts: 'reposts', + Saves: 'saves' +} as const; +export type GetUserLibraryPlaylistsSortMethodEnum = typeof GetUserLibraryPlaylistsSortMethodEnum[keyof typeof GetUserLibraryPlaylistsSortMethodEnum]; +/** + * @export + */ +export const GetUserLibraryTracksSortMethodEnum = { + Title: 'title', + ArtistName: 'artist_name', + ReleaseDate: 'release_date', + LastListenDate: 'last_listen_date', + AddedDate: 'added_date', + Plays: 'plays', + Reposts: 'reposts', + Saves: 'saves', + MostListensByUser: 'most_listens_by_user' +} as const; +export type GetUserLibraryTracksSortMethodEnum = typeof GetUserLibraryTracksSortMethodEnum[keyof typeof GetUserLibraryTracksSortMethodEnum]; +/** + * @export + */ +export const GetUserLibraryTracksSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetUserLibraryTracksSortDirectionEnum = typeof GetUserLibraryTracksSortDirectionEnum[keyof typeof GetUserLibraryTracksSortDirectionEnum]; +/** + * @export + */ +export const GetUserLibraryTracksTypeEnum = { + All: 'all', + Repost: 'repost', + Favorite: 'favorite', + Purchase: 'purchase' +} as const; +export type GetUserLibraryTracksTypeEnum = typeof GetUserLibraryTracksTypeEnum[keyof typeof GetUserLibraryTracksTypeEnum]; /** * @export */ diff --git a/packages/sdk/src/sdk/api/generated/default/apis/index.ts b/packages/sdk/src/sdk/api/generated/default/apis/index.ts index add1ec965fe..e42b90893e7 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/index.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/index.ts @@ -1,17 +1,22 @@ /* tslint:disable */ /* eslint-disable */ export * from './ChallengesApi'; +export * from './CidDataApi'; export * from './CoinsApi'; export * from './CommentsApi'; export * from './DashboardWalletUsersApi'; export * from './DeveloperAppsApi'; export * from './EventsApi'; export * from './ExploreApi'; +export * from './NotificationsApi'; export * from './PlaylistsApi'; export * from './PrizesApi'; +export * from './ReactionsApi'; export * from './ResolveApi'; export * from './RewardsApi'; +export * from './SearchApi'; export * from './TipsApi'; export * from './TracksApi'; +export * from './TransactionsApi'; export * from './UsersApi'; export * from './WalletApi'; diff --git a/packages/sdk/src/sdk/api/generated/default/models/AccountCollection.ts b/packages/sdk/src/sdk/api/generated/default/models/AccountCollection.ts new file mode 100644 index 00000000000..18c2cbd8a3c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AccountCollection.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { AccountCollectionUser } from './AccountCollectionUser'; +import { + AccountCollectionUserFromJSON, + AccountCollectionUserFromJSONTyped, + AccountCollectionUserToJSON, +} from './AccountCollectionUser'; + +/** + * + * @export + * @interface AccountCollection + */ +export interface AccountCollection { + /** + * + * @type {string} + * @memberof AccountCollection + */ + id: string; + /** + * + * @type {boolean} + * @memberof AccountCollection + */ + isAlbum: boolean; + /** + * + * @type {string} + * @memberof AccountCollection + */ + name: string; + /** + * + * @type {string} + * @memberof AccountCollection + */ + permalink: string; + /** + * + * @type {AccountCollectionUser} + * @memberof AccountCollection + */ + user: AccountCollectionUser; +} + +/** + * Check if a given object implements the AccountCollection interface. + */ +export function instanceOfAccountCollection(value: object): value is AccountCollection { + let isInstance = true; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "name" in value && value["name"] !== undefined; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + + return isInstance; +} + +export function AccountCollectionFromJSON(json: any): AccountCollection { + return AccountCollectionFromJSONTyped(json, false); +} + +export function AccountCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountCollection { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'isAlbum': json['is_album'], + 'name': json['name'], + 'permalink': json['permalink'], + 'user': AccountCollectionUserFromJSON(json['user']), + }; +} + +export function AccountCollectionToJSON(value?: AccountCollection | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'is_album': value.isAlbum, + 'name': value.name, + 'permalink': value.permalink, + 'user': AccountCollectionUserToJSON(value.user), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/AccountCollectionUser.ts b/packages/sdk/src/sdk/api/generated/default/models/AccountCollectionUser.ts new file mode 100644 index 00000000000..9b154722869 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AccountCollectionUser.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface AccountCollectionUser + */ +export interface AccountCollectionUser { + /** + * + * @type {string} + * @memberof AccountCollectionUser + */ + id: string; + /** + * + * @type {string} + * @memberof AccountCollectionUser + */ + handle: string; + /** + * + * @type {boolean} + * @memberof AccountCollectionUser + */ + isDeactivated?: boolean; +} + +/** + * Check if a given object implements the AccountCollectionUser interface. + */ +export function instanceOfAccountCollectionUser(value: object): value is AccountCollectionUser { + let isInstance = true; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "handle" in value && value["handle"] !== undefined; + + return isInstance; +} + +export function AccountCollectionUserFromJSON(json: any): AccountCollectionUser { + return AccountCollectionUserFromJSONTyped(json, false); +} + +export function AccountCollectionUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountCollectionUser { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'handle': json['handle'], + 'isDeactivated': !exists(json, 'is_deactivated') ? undefined : json['is_deactivated'], + }; +} + +export function AccountCollectionUserToJSON(value?: AccountCollectionUser | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'handle': value.handle, + 'is_deactivated': value.isDeactivated, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/AccountFull.ts b/packages/sdk/src/sdk/api/generated/default/models/AccountFull.ts new file mode 100644 index 00000000000..bfcd2aec2cf --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AccountFull.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { AccountCollection } from './AccountCollection'; +import { + AccountCollectionFromJSON, + AccountCollectionFromJSONTyped, + AccountCollectionToJSON, +} from './AccountCollection'; +import type { PlaylistLibrary } from './PlaylistLibrary'; +import { + PlaylistLibraryFromJSON, + PlaylistLibraryFromJSONTyped, + PlaylistLibraryToJSON, +} from './PlaylistLibrary'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface AccountFull + */ +export interface AccountFull { + /** + * + * @type {UserFull} + * @memberof AccountFull + */ + user: UserFull; + /** + * + * @type {Array} + * @memberof AccountFull + */ + playlists: Array; + /** + * + * @type {PlaylistLibrary} + * @memberof AccountFull + */ + playlistLibrary?: PlaylistLibrary; + /** + * + * @type {number} + * @memberof AccountFull + */ + trackSaveCount: number; +} + +/** + * Check if a given object implements the AccountFull interface. + */ +export function instanceOfAccountFull(value: object): value is AccountFull { + let isInstance = true; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "playlists" in value && value["playlists"] !== undefined; + isInstance = isInstance && "trackSaveCount" in value && value["trackSaveCount"] !== undefined; + + return isInstance; +} + +export function AccountFullFromJSON(json: any): AccountFull { + return AccountFullFromJSONTyped(json, false); +} + +export function AccountFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'user': UserFullFromJSON(json['user']), + 'playlists': ((json['playlists'] as Array).map(AccountCollectionFromJSON)), + 'playlistLibrary': !exists(json, 'playlist_library') ? undefined : PlaylistLibraryFromJSON(json['playlist_library']), + 'trackSaveCount': json['track_save_count'], + }; +} + +export function AccountFullToJSON(value?: AccountFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user': UserFullToJSON(value.user), + 'playlists': ((value.playlists as Array).map(AccountCollectionToJSON)), + 'playlist_library': PlaylistLibraryToJSON(value.playlistLibrary), + 'track_save_count': value.trackSaveCount, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ActivityFull.ts b/packages/sdk/src/sdk/api/generated/default/models/ActivityFull.ts new file mode 100644 index 00000000000..ebec9e1ff78 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ActivityFull.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import { + CollectionActivityFullWithoutTracksFromJSONTyped, + TrackActivityFullFromJSONTyped +} from './'; + +/** + * + * @export + * @interface ActivityFull + */ +export interface ActivityFull { + /** + * + * @type {string} + * @memberof ActivityFull + */ + timestamp: string; + /** + * + * @type {string} + * @memberof ActivityFull + */ + itemType: ActivityFullItemTypeEnum; + /** + * + * @type {object} + * @memberof ActivityFull + */ + item: object; + /** + * + * @type {string} + * @memberof ActivityFull + */ + _class: string; +} + + +/** + * @export + */ +export const ActivityFullItemTypeEnum = { + Track: 'track', + Playlist: 'playlist' +} as const; +export type ActivityFullItemTypeEnum = typeof ActivityFullItemTypeEnum[keyof typeof ActivityFullItemTypeEnum]; + + +/** + * Check if a given object implements the ActivityFull interface. + */ +export function instanceOfActivityFull(value: object): value is ActivityFull { + let isInstance = true; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + isInstance = isInstance && "_class" in value && value["_class"] !== undefined; + + return isInstance; +} + +export function ActivityFullFromJSON(json: any): ActivityFull { + return ActivityFullFromJSONTyped(json, false); +} + +export function ActivityFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivityFull { + if ((json === undefined) || (json === null)) { + return json; + } + if (!ignoreDiscriminator) { + if (json['_class'] === 'collection_activity_full_without_tracks') { + return CollectionActivityFullWithoutTracksFromJSONTyped(json, true); + } + if (json['_class'] === 'track_activity_full') { + return TrackActivityFullFromJSONTyped(json, true); + } + } + return { + + 'timestamp': json['timestamp'], + 'itemType': json['item_type'], + 'item': json['item'], + '_class': json['class'], + }; +} + +export function ActivityFullToJSON(value?: ActivityFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'timestamp': value.timestamp, + 'item_type': value.itemType, + 'item': value.item, + 'class': value._class, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotification.ts new file mode 100644 index 00000000000..2f2528e17ef --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { AnnouncementNotificationAction } from './AnnouncementNotificationAction'; +import { + AnnouncementNotificationActionFromJSON, + AnnouncementNotificationActionFromJSONTyped, + AnnouncementNotificationActionToJSON, +} from './AnnouncementNotificationAction'; + +/** + * + * @export + * @interface AnnouncementNotification + */ +export interface AnnouncementNotification { + /** + * + * @type {string} + * @memberof AnnouncementNotification + */ + type: string; + /** + * + * @type {string} + * @memberof AnnouncementNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof AnnouncementNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof AnnouncementNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof AnnouncementNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the AnnouncementNotification interface. + */ +export function instanceOfAnnouncementNotification(value: object): value is AnnouncementNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function AnnouncementNotificationFromJSON(json: any): AnnouncementNotification { + return AnnouncementNotificationFromJSONTyped(json, false); +} + +export function AnnouncementNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnnouncementNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(AnnouncementNotificationActionFromJSON)), + }; +} + +export function AnnouncementNotificationToJSON(value?: AnnouncementNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(AnnouncementNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationAction.ts new file mode 100644 index 00000000000..26f04801d19 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { AnnouncementNotificationActionData } from './AnnouncementNotificationActionData'; +import { + AnnouncementNotificationActionDataFromJSON, + AnnouncementNotificationActionDataFromJSONTyped, + AnnouncementNotificationActionDataToJSON, +} from './AnnouncementNotificationActionData'; + +/** + * + * @export + * @interface AnnouncementNotificationAction + */ +export interface AnnouncementNotificationAction { + /** + * + * @type {string} + * @memberof AnnouncementNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof AnnouncementNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof AnnouncementNotificationAction + */ + timestamp: number; + /** + * + * @type {AnnouncementNotificationActionData} + * @memberof AnnouncementNotificationAction + */ + data: AnnouncementNotificationActionData; +} + +/** + * Check if a given object implements the AnnouncementNotificationAction interface. + */ +export function instanceOfAnnouncementNotificationAction(value: object): value is AnnouncementNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function AnnouncementNotificationActionFromJSON(json: any): AnnouncementNotificationAction { + return AnnouncementNotificationActionFromJSONTyped(json, false); +} + +export function AnnouncementNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnnouncementNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': AnnouncementNotificationActionDataFromJSON(json['data']), + }; +} + +export function AnnouncementNotificationActionToJSON(value?: AnnouncementNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': AnnouncementNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationActionData.ts new file mode 100644 index 00000000000..c6aa5893c99 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AnnouncementNotificationActionData.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface AnnouncementNotificationActionData + */ +export interface AnnouncementNotificationActionData { + /** + * + * @type {string} + * @memberof AnnouncementNotificationActionData + */ + title: string; + /** + * + * @type {string} + * @memberof AnnouncementNotificationActionData + */ + pushBody: string; + /** + * + * @type {string} + * @memberof AnnouncementNotificationActionData + */ + shortDescription: string; + /** + * + * @type {string} + * @memberof AnnouncementNotificationActionData + */ + longDescription: string; + /** + * + * @type {string} + * @memberof AnnouncementNotificationActionData + */ + route: string; +} + +/** + * Check if a given object implements the AnnouncementNotificationActionData interface. + */ +export function instanceOfAnnouncementNotificationActionData(value: object): value is AnnouncementNotificationActionData { + let isInstance = true; + isInstance = isInstance && "title" in value && value["title"] !== undefined; + isInstance = isInstance && "pushBody" in value && value["pushBody"] !== undefined; + isInstance = isInstance && "shortDescription" in value && value["shortDescription"] !== undefined; + isInstance = isInstance && "longDescription" in value && value["longDescription"] !== undefined; + isInstance = isInstance && "route" in value && value["route"] !== undefined; + + return isInstance; +} + +export function AnnouncementNotificationActionDataFromJSON(json: any): AnnouncementNotificationActionData { + return AnnouncementNotificationActionDataFromJSONTyped(json, false); +} + +export function AnnouncementNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnnouncementNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'title': json['title'], + 'pushBody': json['push_body'], + 'shortDescription': json['short_description'], + 'longDescription': json['long_description'], + 'route': json['route'], + }; +} + +export function AnnouncementNotificationActionDataToJSON(value?: AnnouncementNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'title': value.title, + 'push_body': value.pushBody, + 'short_description': value.shortDescription, + 'long_description': value.longDescription, + 'route': value.route, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotification.ts new file mode 100644 index 00000000000..6389f240d30 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ApproveManagerRequestNotificationAction } from './ApproveManagerRequestNotificationAction'; +import { + ApproveManagerRequestNotificationActionFromJSON, + ApproveManagerRequestNotificationActionFromJSONTyped, + ApproveManagerRequestNotificationActionToJSON, +} from './ApproveManagerRequestNotificationAction'; + +/** + * + * @export + * @interface ApproveManagerRequestNotification + */ +export interface ApproveManagerRequestNotification { + /** + * + * @type {string} + * @memberof ApproveManagerRequestNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ApproveManagerRequestNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ApproveManagerRequestNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ApproveManagerRequestNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ApproveManagerRequestNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ApproveManagerRequestNotification interface. + */ +export function instanceOfApproveManagerRequestNotification(value: object): value is ApproveManagerRequestNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ApproveManagerRequestNotificationFromJSON(json: any): ApproveManagerRequestNotification { + return ApproveManagerRequestNotificationFromJSONTyped(json, false); +} + +export function ApproveManagerRequestNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApproveManagerRequestNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ApproveManagerRequestNotificationActionFromJSON)), + }; +} + +export function ApproveManagerRequestNotificationToJSON(value?: ApproveManagerRequestNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ApproveManagerRequestNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationAction.ts new file mode 100644 index 00000000000..1164d67bbb4 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ApproveManagerRequestNotificationActionData } from './ApproveManagerRequestNotificationActionData'; +import { + ApproveManagerRequestNotificationActionDataFromJSON, + ApproveManagerRequestNotificationActionDataFromJSONTyped, + ApproveManagerRequestNotificationActionDataToJSON, +} from './ApproveManagerRequestNotificationActionData'; + +/** + * + * @export + * @interface ApproveManagerRequestNotificationAction + */ +export interface ApproveManagerRequestNotificationAction { + /** + * + * @type {string} + * @memberof ApproveManagerRequestNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ApproveManagerRequestNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ApproveManagerRequestNotificationAction + */ + timestamp: number; + /** + * + * @type {ApproveManagerRequestNotificationActionData} + * @memberof ApproveManagerRequestNotificationAction + */ + data: ApproveManagerRequestNotificationActionData; +} + +/** + * Check if a given object implements the ApproveManagerRequestNotificationAction interface. + */ +export function instanceOfApproveManagerRequestNotificationAction(value: object): value is ApproveManagerRequestNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ApproveManagerRequestNotificationActionFromJSON(json: any): ApproveManagerRequestNotificationAction { + return ApproveManagerRequestNotificationActionFromJSONTyped(json, false); +} + +export function ApproveManagerRequestNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApproveManagerRequestNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ApproveManagerRequestNotificationActionDataFromJSON(json['data']), + }; +} + +export function ApproveManagerRequestNotificationActionToJSON(value?: ApproveManagerRequestNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ApproveManagerRequestNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationActionData.ts new file mode 100644 index 00000000000..ac10d7d4819 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ApproveManagerRequestNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ApproveManagerRequestNotificationActionData + */ +export interface ApproveManagerRequestNotificationActionData { + /** + * + * @type {string} + * @memberof ApproveManagerRequestNotificationActionData + */ + userId: string; + /** + * + * @type {string} + * @memberof ApproveManagerRequestNotificationActionData + */ + granteeUserId: string; + /** + * + * @type {string} + * @memberof ApproveManagerRequestNotificationActionData + */ + granteeAddress: string; +} + +/** + * Check if a given object implements the ApproveManagerRequestNotificationActionData interface. + */ +export function instanceOfApproveManagerRequestNotificationActionData(value: object): value is ApproveManagerRequestNotificationActionData { + let isInstance = true; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "granteeUserId" in value && value["granteeUserId"] !== undefined; + isInstance = isInstance && "granteeAddress" in value && value["granteeAddress"] !== undefined; + + return isInstance; +} + +export function ApproveManagerRequestNotificationActionDataFromJSON(json: any): ApproveManagerRequestNotificationActionData { + return ApproveManagerRequestNotificationActionDataFromJSONTyped(json, false); +} + +export function ApproveManagerRequestNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApproveManagerRequestNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': json['user_id'], + 'granteeUserId': json['grantee_user_id'], + 'granteeAddress': json['grantee_address'], + }; +} + +export function ApproveManagerRequestNotificationActionDataToJSON(value?: ApproveManagerRequestNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user_id': value.userId, + 'grantee_user_id': value.granteeUserId, + 'grantee_address': value.granteeAddress, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotification.ts new file mode 100644 index 00000000000..403fec378b0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ArtistRemixContestEndedNotificationAction } from './ArtistRemixContestEndedNotificationAction'; +import { + ArtistRemixContestEndedNotificationActionFromJSON, + ArtistRemixContestEndedNotificationActionFromJSONTyped, + ArtistRemixContestEndedNotificationActionToJSON, +} from './ArtistRemixContestEndedNotificationAction'; + +/** + * + * @export + * @interface ArtistRemixContestEndedNotification + */ +export interface ArtistRemixContestEndedNotification { + /** + * + * @type {string} + * @memberof ArtistRemixContestEndedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ArtistRemixContestEndedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ArtistRemixContestEndedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ArtistRemixContestEndedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ArtistRemixContestEndedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ArtistRemixContestEndedNotification interface. + */ +export function instanceOfArtistRemixContestEndedNotification(value: object): value is ArtistRemixContestEndedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestEndedNotificationFromJSON(json: any): ArtistRemixContestEndedNotification { + return ArtistRemixContestEndedNotificationFromJSONTyped(json, false); +} + +export function ArtistRemixContestEndedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestEndedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ArtistRemixContestEndedNotificationActionFromJSON)), + }; +} + +export function ArtistRemixContestEndedNotificationToJSON(value?: ArtistRemixContestEndedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ArtistRemixContestEndedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationAction.ts new file mode 100644 index 00000000000..560fd5824a3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ArtistRemixContestEndedNotificationActionData } from './ArtistRemixContestEndedNotificationActionData'; +import { + ArtistRemixContestEndedNotificationActionDataFromJSON, + ArtistRemixContestEndedNotificationActionDataFromJSONTyped, + ArtistRemixContestEndedNotificationActionDataToJSON, +} from './ArtistRemixContestEndedNotificationActionData'; + +/** + * + * @export + * @interface ArtistRemixContestEndedNotificationAction + */ +export interface ArtistRemixContestEndedNotificationAction { + /** + * + * @type {string} + * @memberof ArtistRemixContestEndedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ArtistRemixContestEndedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ArtistRemixContestEndedNotificationAction + */ + timestamp: number; + /** + * + * @type {ArtistRemixContestEndedNotificationActionData} + * @memberof ArtistRemixContestEndedNotificationAction + */ + data: ArtistRemixContestEndedNotificationActionData; +} + +/** + * Check if a given object implements the ArtistRemixContestEndedNotificationAction interface. + */ +export function instanceOfArtistRemixContestEndedNotificationAction(value: object): value is ArtistRemixContestEndedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestEndedNotificationActionFromJSON(json: any): ArtistRemixContestEndedNotificationAction { + return ArtistRemixContestEndedNotificationActionFromJSONTyped(json, false); +} + +export function ArtistRemixContestEndedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestEndedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ArtistRemixContestEndedNotificationActionDataFromJSON(json['data']), + }; +} + +export function ArtistRemixContestEndedNotificationActionToJSON(value?: ArtistRemixContestEndedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ArtistRemixContestEndedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationActionData.ts new file mode 100644 index 00000000000..be6c9946c63 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndedNotificationActionData.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ArtistRemixContestEndedNotificationActionData + */ +export interface ArtistRemixContestEndedNotificationActionData { + /** + * + * @type {string} + * @memberof ArtistRemixContestEndedNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the ArtistRemixContestEndedNotificationActionData interface. + */ +export function instanceOfArtistRemixContestEndedNotificationActionData(value: object): value is ArtistRemixContestEndedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestEndedNotificationActionDataFromJSON(json: any): ArtistRemixContestEndedNotificationActionData { + return ArtistRemixContestEndedNotificationActionDataFromJSONTyped(json, false); +} + +export function ArtistRemixContestEndedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestEndedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityId': json['entity_id'], + }; +} + +export function ArtistRemixContestEndedNotificationActionDataToJSON(value?: ArtistRemixContestEndedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotification.ts new file mode 100644 index 00000000000..6d0c51b582e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ArtistRemixContestEndingSoonNotificationAction } from './ArtistRemixContestEndingSoonNotificationAction'; +import { + ArtistRemixContestEndingSoonNotificationActionFromJSON, + ArtistRemixContestEndingSoonNotificationActionFromJSONTyped, + ArtistRemixContestEndingSoonNotificationActionToJSON, +} from './ArtistRemixContestEndingSoonNotificationAction'; + +/** + * + * @export + * @interface ArtistRemixContestEndingSoonNotification + */ +export interface ArtistRemixContestEndingSoonNotification { + /** + * + * @type {string} + * @memberof ArtistRemixContestEndingSoonNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ArtistRemixContestEndingSoonNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ArtistRemixContestEndingSoonNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ArtistRemixContestEndingSoonNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ArtistRemixContestEndingSoonNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ArtistRemixContestEndingSoonNotification interface. + */ +export function instanceOfArtistRemixContestEndingSoonNotification(value: object): value is ArtistRemixContestEndingSoonNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestEndingSoonNotificationFromJSON(json: any): ArtistRemixContestEndingSoonNotification { + return ArtistRemixContestEndingSoonNotificationFromJSONTyped(json, false); +} + +export function ArtistRemixContestEndingSoonNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestEndingSoonNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ArtistRemixContestEndingSoonNotificationActionFromJSON)), + }; +} + +export function ArtistRemixContestEndingSoonNotificationToJSON(value?: ArtistRemixContestEndingSoonNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ArtistRemixContestEndingSoonNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationAction.ts new file mode 100644 index 00000000000..55500097f4c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ArtistRemixContestEndingSoonNotificationActionData } from './ArtistRemixContestEndingSoonNotificationActionData'; +import { + ArtistRemixContestEndingSoonNotificationActionDataFromJSON, + ArtistRemixContestEndingSoonNotificationActionDataFromJSONTyped, + ArtistRemixContestEndingSoonNotificationActionDataToJSON, +} from './ArtistRemixContestEndingSoonNotificationActionData'; + +/** + * + * @export + * @interface ArtistRemixContestEndingSoonNotificationAction + */ +export interface ArtistRemixContestEndingSoonNotificationAction { + /** + * + * @type {string} + * @memberof ArtistRemixContestEndingSoonNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ArtistRemixContestEndingSoonNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ArtistRemixContestEndingSoonNotificationAction + */ + timestamp: number; + /** + * + * @type {ArtistRemixContestEndingSoonNotificationActionData} + * @memberof ArtistRemixContestEndingSoonNotificationAction + */ + data: ArtistRemixContestEndingSoonNotificationActionData; +} + +/** + * Check if a given object implements the ArtistRemixContestEndingSoonNotificationAction interface. + */ +export function instanceOfArtistRemixContestEndingSoonNotificationAction(value: object): value is ArtistRemixContestEndingSoonNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestEndingSoonNotificationActionFromJSON(json: any): ArtistRemixContestEndingSoonNotificationAction { + return ArtistRemixContestEndingSoonNotificationActionFromJSONTyped(json, false); +} + +export function ArtistRemixContestEndingSoonNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestEndingSoonNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ArtistRemixContestEndingSoonNotificationActionDataFromJSON(json['data']), + }; +} + +export function ArtistRemixContestEndingSoonNotificationActionToJSON(value?: ArtistRemixContestEndingSoonNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ArtistRemixContestEndingSoonNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationActionData.ts new file mode 100644 index 00000000000..ef6fbda2ce1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestEndingSoonNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ArtistRemixContestEndingSoonNotificationActionData + */ +export interface ArtistRemixContestEndingSoonNotificationActionData { + /** + * + * @type {string} + * @memberof ArtistRemixContestEndingSoonNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof ArtistRemixContestEndingSoonNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the ArtistRemixContestEndingSoonNotificationActionData interface. + */ +export function instanceOfArtistRemixContestEndingSoonNotificationActionData(value: object): value is ArtistRemixContestEndingSoonNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestEndingSoonNotificationActionDataFromJSON(json: any): ArtistRemixContestEndingSoonNotificationActionData { + return ArtistRemixContestEndingSoonNotificationActionDataFromJSONTyped(json, false); +} + +export function ArtistRemixContestEndingSoonNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestEndingSoonNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function ArtistRemixContestEndingSoonNotificationActionDataToJSON(value?: ArtistRemixContestEndingSoonNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotification.ts new file mode 100644 index 00000000000..bcbfb6ef582 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ArtistRemixContestSubmissionsNotificationAction } from './ArtistRemixContestSubmissionsNotificationAction'; +import { + ArtistRemixContestSubmissionsNotificationActionFromJSON, + ArtistRemixContestSubmissionsNotificationActionFromJSONTyped, + ArtistRemixContestSubmissionsNotificationActionToJSON, +} from './ArtistRemixContestSubmissionsNotificationAction'; + +/** + * + * @export + * @interface ArtistRemixContestSubmissionsNotification + */ +export interface ArtistRemixContestSubmissionsNotification { + /** + * + * @type {string} + * @memberof ArtistRemixContestSubmissionsNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ArtistRemixContestSubmissionsNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ArtistRemixContestSubmissionsNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ArtistRemixContestSubmissionsNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ArtistRemixContestSubmissionsNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ArtistRemixContestSubmissionsNotification interface. + */ +export function instanceOfArtistRemixContestSubmissionsNotification(value: object): value is ArtistRemixContestSubmissionsNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestSubmissionsNotificationFromJSON(json: any): ArtistRemixContestSubmissionsNotification { + return ArtistRemixContestSubmissionsNotificationFromJSONTyped(json, false); +} + +export function ArtistRemixContestSubmissionsNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestSubmissionsNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ArtistRemixContestSubmissionsNotificationActionFromJSON)), + }; +} + +export function ArtistRemixContestSubmissionsNotificationToJSON(value?: ArtistRemixContestSubmissionsNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ArtistRemixContestSubmissionsNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationAction.ts new file mode 100644 index 00000000000..d96d611e23e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ArtistRemixContestSubmissionsNotificationActionData } from './ArtistRemixContestSubmissionsNotificationActionData'; +import { + ArtistRemixContestSubmissionsNotificationActionDataFromJSON, + ArtistRemixContestSubmissionsNotificationActionDataFromJSONTyped, + ArtistRemixContestSubmissionsNotificationActionDataToJSON, +} from './ArtistRemixContestSubmissionsNotificationActionData'; + +/** + * + * @export + * @interface ArtistRemixContestSubmissionsNotificationAction + */ +export interface ArtistRemixContestSubmissionsNotificationAction { + /** + * + * @type {string} + * @memberof ArtistRemixContestSubmissionsNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ArtistRemixContestSubmissionsNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ArtistRemixContestSubmissionsNotificationAction + */ + timestamp: number; + /** + * + * @type {ArtistRemixContestSubmissionsNotificationActionData} + * @memberof ArtistRemixContestSubmissionsNotificationAction + */ + data: ArtistRemixContestSubmissionsNotificationActionData; +} + +/** + * Check if a given object implements the ArtistRemixContestSubmissionsNotificationAction interface. + */ +export function instanceOfArtistRemixContestSubmissionsNotificationAction(value: object): value is ArtistRemixContestSubmissionsNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestSubmissionsNotificationActionFromJSON(json: any): ArtistRemixContestSubmissionsNotificationAction { + return ArtistRemixContestSubmissionsNotificationActionFromJSONTyped(json, false); +} + +export function ArtistRemixContestSubmissionsNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestSubmissionsNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ArtistRemixContestSubmissionsNotificationActionDataFromJSON(json['data']), + }; +} + +export function ArtistRemixContestSubmissionsNotificationActionToJSON(value?: ArtistRemixContestSubmissionsNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ArtistRemixContestSubmissionsNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationActionData.ts new file mode 100644 index 00000000000..7110d144197 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistRemixContestSubmissionsNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ArtistRemixContestSubmissionsNotificationActionData + */ +export interface ArtistRemixContestSubmissionsNotificationActionData { + /** + * + * @type {string} + * @memberof ArtistRemixContestSubmissionsNotificationActionData + */ + eventId: string; + /** + * + * @type {number} + * @memberof ArtistRemixContestSubmissionsNotificationActionData + */ + milestone: number; + /** + * + * @type {string} + * @memberof ArtistRemixContestSubmissionsNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the ArtistRemixContestSubmissionsNotificationActionData interface. + */ +export function instanceOfArtistRemixContestSubmissionsNotificationActionData(value: object): value is ArtistRemixContestSubmissionsNotificationActionData { + let isInstance = true; + isInstance = isInstance && "eventId" in value && value["eventId"] !== undefined; + isInstance = isInstance && "milestone" in value && value["milestone"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function ArtistRemixContestSubmissionsNotificationActionDataFromJSON(json: any): ArtistRemixContestSubmissionsNotificationActionData { + return ArtistRemixContestSubmissionsNotificationActionDataFromJSONTyped(json, false); +} + +export function ArtistRemixContestSubmissionsNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistRemixContestSubmissionsNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'eventId': json['event_id'], + 'milestone': json['milestone'], + 'entityId': json['entity_id'], + }; +} + +export function ArtistRemixContestSubmissionsNotificationActionDataToJSON(value?: ArtistRemixContestSubmissionsNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'event_id': value.eventId, + 'milestone': value.milestone, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Attestation.ts b/packages/sdk/src/sdk/api/generated/default/models/Attestation.ts new file mode 100644 index 00000000000..90281231826 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Attestation.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface Attestation + */ +export interface Attestation { + /** + * + * @type {string} + * @memberof Attestation + */ + ownerWallet: string; + /** + * + * @type {string} + * @memberof Attestation + */ + attestation: string; +} + +/** + * Check if a given object implements the Attestation interface. + */ +export function instanceOfAttestation(value: object): value is Attestation { + let isInstance = true; + isInstance = isInstance && "ownerWallet" in value && value["ownerWallet"] !== undefined; + isInstance = isInstance && "attestation" in value && value["attestation"] !== undefined; + + return isInstance; +} + +export function AttestationFromJSON(json: any): Attestation { + return AttestationFromJSONTyped(json, false); +} + +export function AttestationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attestation { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'ownerWallet': json['owner_wallet'], + 'attestation': json['attestation'], + }; +} + +export function AttestationToJSON(value?: Attestation | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'owner_wallet': value.ownerWallet, + 'attestation': value.attestation, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/AttestationReponse.ts b/packages/sdk/src/sdk/api/generated/default/models/AttestationReponse.ts new file mode 100644 index 00000000000..ccee5936545 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AttestationReponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Attestation } from './Attestation'; +import { + AttestationFromJSON, + AttestationFromJSONTyped, + AttestationToJSON, +} from './Attestation'; + +/** + * + * @export + * @interface AttestationReponse + */ +export interface AttestationReponse { + /** + * + * @type {Attestation} + * @memberof AttestationReponse + */ + data?: Attestation; +} + +/** + * Check if a given object implements the AttestationReponse interface. + */ +export function instanceOfAttestationReponse(value: object): value is AttestationReponse { + let isInstance = true; + + return isInstance; +} + +export function AttestationReponseFromJSON(json: any): AttestationReponse { + return AttestationReponseFromJSONTyped(json, false); +} + +export function AttestationReponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttestationReponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : AttestationFromJSON(json['data']), + }; +} + +export function AttestationReponseToJSON(value?: AttestationReponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': AttestationToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotification.ts new file mode 100644 index 00000000000..a166a054d50 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ChallengeRewardNotificationAction } from './ChallengeRewardNotificationAction'; +import { + ChallengeRewardNotificationActionFromJSON, + ChallengeRewardNotificationActionFromJSONTyped, + ChallengeRewardNotificationActionToJSON, +} from './ChallengeRewardNotificationAction'; + +/** + * + * @export + * @interface ChallengeRewardNotification + */ +export interface ChallengeRewardNotification { + /** + * + * @type {string} + * @memberof ChallengeRewardNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ChallengeRewardNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ChallengeRewardNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ChallengeRewardNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ChallengeRewardNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ChallengeRewardNotification interface. + */ +export function instanceOfChallengeRewardNotification(value: object): value is ChallengeRewardNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ChallengeRewardNotificationFromJSON(json: any): ChallengeRewardNotification { + return ChallengeRewardNotificationFromJSONTyped(json, false); +} + +export function ChallengeRewardNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChallengeRewardNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ChallengeRewardNotificationActionFromJSON)), + }; +} + +export function ChallengeRewardNotificationToJSON(value?: ChallengeRewardNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ChallengeRewardNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationAction.ts new file mode 100644 index 00000000000..38883145956 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ChallengeRewardNotificationActionData } from './ChallengeRewardNotificationActionData'; +import { + ChallengeRewardNotificationActionDataFromJSON, + ChallengeRewardNotificationActionDataFromJSONTyped, + ChallengeRewardNotificationActionDataToJSON, +} from './ChallengeRewardNotificationActionData'; + +/** + * + * @export + * @interface ChallengeRewardNotificationAction + */ +export interface ChallengeRewardNotificationAction { + /** + * + * @type {string} + * @memberof ChallengeRewardNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ChallengeRewardNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ChallengeRewardNotificationAction + */ + timestamp: number; + /** + * + * @type {ChallengeRewardNotificationActionData} + * @memberof ChallengeRewardNotificationAction + */ + data: ChallengeRewardNotificationActionData; +} + +/** + * Check if a given object implements the ChallengeRewardNotificationAction interface. + */ +export function instanceOfChallengeRewardNotificationAction(value: object): value is ChallengeRewardNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ChallengeRewardNotificationActionFromJSON(json: any): ChallengeRewardNotificationAction { + return ChallengeRewardNotificationActionFromJSONTyped(json, false); +} + +export function ChallengeRewardNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChallengeRewardNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ChallengeRewardNotificationActionDataFromJSON(json['data']), + }; +} + +export function ChallengeRewardNotificationActionToJSON(value?: ChallengeRewardNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ChallengeRewardNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationActionData.ts new file mode 100644 index 00000000000..c7de8539cdb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ChallengeRewardNotificationActionData.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ChallengeRewardNotificationActionData + */ +export interface ChallengeRewardNotificationActionData { + /** + * + * @type {string} + * @memberof ChallengeRewardNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof ChallengeRewardNotificationActionData + */ + specifier: string; + /** + * + * @type {string} + * @memberof ChallengeRewardNotificationActionData + */ + challengeId: string; + /** + * + * @type {number} + * @memberof ChallengeRewardNotificationActionData + */ + listenStreak?: number; +} + +/** + * Check if a given object implements the ChallengeRewardNotificationActionData interface. + */ +export function instanceOfChallengeRewardNotificationActionData(value: object): value is ChallengeRewardNotificationActionData { + let isInstance = true; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "challengeId" in value && value["challengeId"] !== undefined; + + return isInstance; +} + +export function ChallengeRewardNotificationActionDataFromJSON(json: any): ChallengeRewardNotificationActionData { + return ChallengeRewardNotificationActionDataFromJSONTyped(json, false); +} + +export function ChallengeRewardNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChallengeRewardNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'amount': json['amount'], + 'specifier': json['specifier'], + 'challengeId': json['challenge_id'], + 'listenStreak': !exists(json, 'listen_streak') ? undefined : json['listen_streak'], + }; +} + +export function ChallengeRewardNotificationActionDataToJSON(value?: ChallengeRewardNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'amount': value.amount, + 'specifier': value.specifier, + 'challenge_id': value.challengeId, + 'listen_streak': value.listenStreak, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CidData.ts b/packages/sdk/src/sdk/api/generated/default/models/CidData.ts new file mode 100644 index 00000000000..b655cf3b548 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CidData.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CidData + */ +export interface CidData { + /** + * + * @type {object} + * @memberof CidData + */ + collectibles?: object; + /** + * + * @type {object} + * @memberof CidData + */ + associatedSolWallets?: object; + /** + * + * @type {object} + * @memberof CidData + */ + associatedWallets?: object; +} + +/** + * Check if a given object implements the CidData interface. + */ +export function instanceOfCidData(value: object): value is CidData { + let isInstance = true; + + return isInstance; +} + +export function CidDataFromJSON(json: any): CidData { + return CidDataFromJSONTyped(json, false); +} + +export function CidDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CidData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'collectibles': !exists(json, 'collectibles') ? undefined : json['collectibles'], + 'associatedSolWallets': !exists(json, 'associated_sol_wallets') ? undefined : json['associated_sol_wallets'], + 'associatedWallets': !exists(json, 'associated_wallets') ? undefined : json['associated_wallets'], + }; +} + +export function CidDataToJSON(value?: CidData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'collectibles': value.collectibles, + 'associated_sol_wallets': value.associatedSolWallets, + 'associated_wallets': value.associatedWallets, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CidDataResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/CidDataResponse.ts new file mode 100644 index 00000000000..bd5468f592f --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CidDataResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { DataAndType } from './DataAndType'; +import { + DataAndTypeFromJSON, + DataAndTypeFromJSONTyped, + DataAndTypeToJSON, +} from './DataAndType'; + +/** + * + * @export + * @interface CidDataResponse + */ +export interface CidDataResponse { + /** + * + * @type {DataAndType} + * @memberof CidDataResponse + */ + data?: DataAndType; +} + +/** + * Check if a given object implements the CidDataResponse interface. + */ +export function instanceOfCidDataResponse(value: object): value is CidDataResponse { + let isInstance = true; + + return isInstance; +} + +export function CidDataResponseFromJSON(json: any): CidDataResponse { + return CidDataResponseFromJSONTyped(json, false); +} + +export function CidDataResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CidDataResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : DataAndTypeFromJSON(json['data']), + }; +} + +export function CidDataResponseToJSON(value?: CidDataResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': DataAndTypeToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotification.ts new file mode 100644 index 00000000000..c9ed666a0e2 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ClaimableRewardNotificationAction } from './ClaimableRewardNotificationAction'; +import { + ClaimableRewardNotificationActionFromJSON, + ClaimableRewardNotificationActionFromJSONTyped, + ClaimableRewardNotificationActionToJSON, +} from './ClaimableRewardNotificationAction'; + +/** + * + * @export + * @interface ClaimableRewardNotification + */ +export interface ClaimableRewardNotification { + /** + * + * @type {string} + * @memberof ClaimableRewardNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ClaimableRewardNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ClaimableRewardNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ClaimableRewardNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ClaimableRewardNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ClaimableRewardNotification interface. + */ +export function instanceOfClaimableRewardNotification(value: object): value is ClaimableRewardNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ClaimableRewardNotificationFromJSON(json: any): ClaimableRewardNotification { + return ClaimableRewardNotificationFromJSONTyped(json, false); +} + +export function ClaimableRewardNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClaimableRewardNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ClaimableRewardNotificationActionFromJSON)), + }; +} + +export function ClaimableRewardNotificationToJSON(value?: ClaimableRewardNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ClaimableRewardNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationAction.ts new file mode 100644 index 00000000000..5b08da0af29 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ClaimableRewardNotificationActionData } from './ClaimableRewardNotificationActionData'; +import { + ClaimableRewardNotificationActionDataFromJSON, + ClaimableRewardNotificationActionDataFromJSONTyped, + ClaimableRewardNotificationActionDataToJSON, +} from './ClaimableRewardNotificationActionData'; + +/** + * + * @export + * @interface ClaimableRewardNotificationAction + */ +export interface ClaimableRewardNotificationAction { + /** + * + * @type {string} + * @memberof ClaimableRewardNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ClaimableRewardNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ClaimableRewardNotificationAction + */ + timestamp: number; + /** + * + * @type {ClaimableRewardNotificationActionData} + * @memberof ClaimableRewardNotificationAction + */ + data: ClaimableRewardNotificationActionData; +} + +/** + * Check if a given object implements the ClaimableRewardNotificationAction interface. + */ +export function instanceOfClaimableRewardNotificationAction(value: object): value is ClaimableRewardNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ClaimableRewardNotificationActionFromJSON(json: any): ClaimableRewardNotificationAction { + return ClaimableRewardNotificationActionFromJSONTyped(json, false); +} + +export function ClaimableRewardNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClaimableRewardNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ClaimableRewardNotificationActionDataFromJSON(json['data']), + }; +} + +export function ClaimableRewardNotificationActionToJSON(value?: ClaimableRewardNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ClaimableRewardNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationActionData.ts new file mode 100644 index 00000000000..3e1488428c7 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ClaimableRewardNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ClaimableRewardNotificationActionData + */ +export interface ClaimableRewardNotificationActionData { + /** + * + * @type {string} + * @memberof ClaimableRewardNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof ClaimableRewardNotificationActionData + */ + specifier: string; + /** + * + * @type {string} + * @memberof ClaimableRewardNotificationActionData + */ + challengeId: string; +} + +/** + * Check if a given object implements the ClaimableRewardNotificationActionData interface. + */ +export function instanceOfClaimableRewardNotificationActionData(value: object): value is ClaimableRewardNotificationActionData { + let isInstance = true; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "challengeId" in value && value["challengeId"] !== undefined; + + return isInstance; +} + +export function ClaimableRewardNotificationActionDataFromJSON(json: any): ClaimableRewardNotificationActionData { + return ClaimableRewardNotificationActionDataFromJSONTyped(json, false); +} + +export function ClaimableRewardNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClaimableRewardNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'amount': json['amount'], + 'specifier': json['specifier'], + 'challengeId': json['challenge_id'], + }; +} + +export function ClaimableRewardNotificationActionDataToJSON(value?: ClaimableRewardNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'amount': value.amount, + 'specifier': value.specifier, + 'challenge_id': value.challengeId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityFullWithoutTracks.ts b/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityFullWithoutTracks.ts new file mode 100644 index 00000000000..13f3f04b05c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityFullWithoutTracks.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ActivityFull } from './ActivityFull'; +import { + ActivityFullFromJSON, + ActivityFullFromJSONTyped, + ActivityFullToJSON, +} from './ActivityFull'; +import type { PlaylistFullWithoutTracks } from './PlaylistFullWithoutTracks'; +import { + PlaylistFullWithoutTracksFromJSON, + PlaylistFullWithoutTracksFromJSONTyped, + PlaylistFullWithoutTracksToJSON, +} from './PlaylistFullWithoutTracks'; + +/** + * + * @export + * @interface CollectionActivityFullWithoutTracks + */ +export interface CollectionActivityFullWithoutTracks extends ActivityFull { + /** + * + * @type {string} + * @memberof CollectionActivityFullWithoutTracks + */ + itemType: CollectionActivityFullWithoutTracksItemTypeEnum; + /** + * + * @type {PlaylistFullWithoutTracks} + * @memberof CollectionActivityFullWithoutTracks + */ + item: PlaylistFullWithoutTracks; +} + + +/** + * @export + */ +export const CollectionActivityFullWithoutTracksItemTypeEnum = { + Playlist: 'playlist' +} as const; +export type CollectionActivityFullWithoutTracksItemTypeEnum = typeof CollectionActivityFullWithoutTracksItemTypeEnum[keyof typeof CollectionActivityFullWithoutTracksItemTypeEnum]; + + +/** + * Check if a given object implements the CollectionActivityFullWithoutTracks interface. + */ +export function instanceOfCollectionActivityFullWithoutTracks(value: object): value is CollectionActivityFullWithoutTracks { + let isInstance = true; + isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + + return isInstance; +} + +export function CollectionActivityFullWithoutTracksFromJSON(json: any): CollectionActivityFullWithoutTracks { + return CollectionActivityFullWithoutTracksFromJSONTyped(json, false); +} + +export function CollectionActivityFullWithoutTracksFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionActivityFullWithoutTracks { + if ((json === undefined) || (json === null)) { + return json; + } + return { + ...ActivityFullFromJSONTyped(json, ignoreDiscriminator), + 'itemType': json['item_type'], + 'item': PlaylistFullWithoutTracksFromJSON(json['item']), + }; +} + +export function CollectionActivityFullWithoutTracksToJSON(value?: CollectionActivityFullWithoutTracks | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + ...ActivityFullToJSON(value), + 'item_type': value.itemType, + 'item': PlaylistFullWithoutTracksToJSON(value.item), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponseFull.ts new file mode 100644 index 00000000000..f1f740dcff8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponseFull.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CollectionActivityFullWithoutTracks } from './CollectionActivityFullWithoutTracks'; +import { + CollectionActivityFullWithoutTracksFromJSON, + CollectionActivityFullWithoutTracksFromJSONTyped, + CollectionActivityFullWithoutTracksToJSON, +} from './CollectionActivityFullWithoutTracks'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface CollectionLibraryResponseFull + */ +export interface CollectionLibraryResponseFull { + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof CollectionLibraryResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof CollectionLibraryResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof CollectionLibraryResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof CollectionLibraryResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the CollectionLibraryResponseFull interface. + */ +export function instanceOfCollectionLibraryResponseFull(value: object): value is CollectionLibraryResponseFull { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function CollectionLibraryResponseFullFromJSON(json: any): CollectionLibraryResponseFull { + return CollectionLibraryResponseFullFromJSONTyped(json, false); +} + +export function CollectionLibraryResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionLibraryResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(CollectionActivityFullWithoutTracksFromJSON)), + }; +} + +export function CollectionLibraryResponseFullToJSON(value?: CollectionLibraryResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(CollectionActivityFullWithoutTracksToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotification.ts new file mode 100644 index 00000000000..56434aada64 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentMentionNotificationAction } from './CommentMentionNotificationAction'; +import { + CommentMentionNotificationActionFromJSON, + CommentMentionNotificationActionFromJSONTyped, + CommentMentionNotificationActionToJSON, +} from './CommentMentionNotificationAction'; + +/** + * + * @export + * @interface CommentMentionNotification + */ +export interface CommentMentionNotification { + /** + * + * @type {string} + * @memberof CommentMentionNotification + */ + type: string; + /** + * + * @type {string} + * @memberof CommentMentionNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof CommentMentionNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof CommentMentionNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof CommentMentionNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the CommentMentionNotification interface. + */ +export function instanceOfCommentMentionNotification(value: object): value is CommentMentionNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function CommentMentionNotificationFromJSON(json: any): CommentMentionNotification { + return CommentMentionNotificationFromJSONTyped(json, false); +} + +export function CommentMentionNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentMentionNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(CommentMentionNotificationActionFromJSON)), + }; +} + +export function CommentMentionNotificationToJSON(value?: CommentMentionNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(CommentMentionNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationAction.ts new file mode 100644 index 00000000000..7e1ac254dbd --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentMentionNotificationActionData } from './CommentMentionNotificationActionData'; +import { + CommentMentionNotificationActionDataFromJSON, + CommentMentionNotificationActionDataFromJSONTyped, + CommentMentionNotificationActionDataToJSON, +} from './CommentMentionNotificationActionData'; + +/** + * + * @export + * @interface CommentMentionNotificationAction + */ +export interface CommentMentionNotificationAction { + /** + * + * @type {string} + * @memberof CommentMentionNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof CommentMentionNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof CommentMentionNotificationAction + */ + timestamp: number; + /** + * + * @type {CommentMentionNotificationActionData} + * @memberof CommentMentionNotificationAction + */ + data: CommentMentionNotificationActionData; +} + +/** + * Check if a given object implements the CommentMentionNotificationAction interface. + */ +export function instanceOfCommentMentionNotificationAction(value: object): value is CommentMentionNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function CommentMentionNotificationActionFromJSON(json: any): CommentMentionNotificationAction { + return CommentMentionNotificationActionFromJSONTyped(json, false); +} + +export function CommentMentionNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentMentionNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': CommentMentionNotificationActionDataFromJSON(json['data']), + }; +} + +export function CommentMentionNotificationActionToJSON(value?: CommentMentionNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': CommentMentionNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationActionData.ts new file mode 100644 index 00000000000..e61204befcb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentMentionNotificationActionData.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CommentMentionNotificationActionData + */ +export interface CommentMentionNotificationActionData { + /** + * + * @type {string} + * @memberof CommentMentionNotificationActionData + */ + type: CommentMentionNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof CommentMentionNotificationActionData + */ + entityId: string; + /** + * + * @type {string} + * @memberof CommentMentionNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof CommentMentionNotificationActionData + */ + commentUserId: string; + /** + * + * @type {string} + * @memberof CommentMentionNotificationActionData + */ + commentId?: string; +} + + +/** + * @export + */ +export const CommentMentionNotificationActionDataTypeEnum = { + Track: 'Track', + Playlist: 'Playlist', + Album: 'Album' +} as const; +export type CommentMentionNotificationActionDataTypeEnum = typeof CommentMentionNotificationActionDataTypeEnum[keyof typeof CommentMentionNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the CommentMentionNotificationActionData interface. + */ +export function instanceOfCommentMentionNotificationActionData(value: object): value is CommentMentionNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "commentUserId" in value && value["commentUserId"] !== undefined; + + return isInstance; +} + +export function CommentMentionNotificationActionDataFromJSON(json: any): CommentMentionNotificationActionData { + return CommentMentionNotificationActionDataFromJSONTyped(json, false); +} + +export function CommentMentionNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentMentionNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'entityId': json['entity_id'], + 'entityUserId': json['entity_user_id'], + 'commentUserId': json['comment_user_id'], + 'commentId': !exists(json, 'comment_id') ? undefined : json['comment_id'], + }; +} + +export function CommentMentionNotificationActionDataToJSON(value?: CommentMentionNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'entity_id': value.entityId, + 'entity_user_id': value.entityUserId, + 'comment_user_id': value.commentUserId, + 'comment_id': value.commentId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentNotification.ts new file mode 100644 index 00000000000..9dbfd9fb730 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentNotificationAction } from './CommentNotificationAction'; +import { + CommentNotificationActionFromJSON, + CommentNotificationActionFromJSONTyped, + CommentNotificationActionToJSON, +} from './CommentNotificationAction'; + +/** + * + * @export + * @interface CommentNotification + */ +export interface CommentNotification { + /** + * + * @type {string} + * @memberof CommentNotification + */ + type: string; + /** + * + * @type {string} + * @memberof CommentNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof CommentNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof CommentNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof CommentNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the CommentNotification interface. + */ +export function instanceOfCommentNotification(value: object): value is CommentNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function CommentNotificationFromJSON(json: any): CommentNotification { + return CommentNotificationFromJSONTyped(json, false); +} + +export function CommentNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(CommentNotificationActionFromJSON)), + }; +} + +export function CommentNotificationToJSON(value?: CommentNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(CommentNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentNotificationAction.ts new file mode 100644 index 00000000000..79e2556cfbe --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentNotificationActionData } from './CommentNotificationActionData'; +import { + CommentNotificationActionDataFromJSON, + CommentNotificationActionDataFromJSONTyped, + CommentNotificationActionDataToJSON, +} from './CommentNotificationActionData'; + +/** + * + * @export + * @interface CommentNotificationAction + */ +export interface CommentNotificationAction { + /** + * + * @type {string} + * @memberof CommentNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof CommentNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof CommentNotificationAction + */ + timestamp: number; + /** + * + * @type {CommentNotificationActionData} + * @memberof CommentNotificationAction + */ + data: CommentNotificationActionData; +} + +/** + * Check if a given object implements the CommentNotificationAction interface. + */ +export function instanceOfCommentNotificationAction(value: object): value is CommentNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function CommentNotificationActionFromJSON(json: any): CommentNotificationAction { + return CommentNotificationActionFromJSONTyped(json, false); +} + +export function CommentNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': CommentNotificationActionDataFromJSON(json['data']), + }; +} + +export function CommentNotificationActionToJSON(value?: CommentNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': CommentNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentNotificationActionData.ts new file mode 100644 index 00000000000..758b71a788e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentNotificationActionData.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CommentNotificationActionData + */ +export interface CommentNotificationActionData { + /** + * + * @type {string} + * @memberof CommentNotificationActionData + */ + type: CommentNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof CommentNotificationActionData + */ + entityId: string; + /** + * + * @type {string} + * @memberof CommentNotificationActionData + */ + commentUserId: string; + /** + * + * @type {string} + * @memberof CommentNotificationActionData + */ + commentId?: string; +} + + +/** + * @export + */ +export const CommentNotificationActionDataTypeEnum = { + Track: 'Track', + Playlist: 'Playlist', + Album: 'Album' +} as const; +export type CommentNotificationActionDataTypeEnum = typeof CommentNotificationActionDataTypeEnum[keyof typeof CommentNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the CommentNotificationActionData interface. + */ +export function instanceOfCommentNotificationActionData(value: object): value is CommentNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + isInstance = isInstance && "commentUserId" in value && value["commentUserId"] !== undefined; + + return isInstance; +} + +export function CommentNotificationActionDataFromJSON(json: any): CommentNotificationActionData { + return CommentNotificationActionDataFromJSONTyped(json, false); +} + +export function CommentNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'entityId': json['entity_id'], + 'commentUserId': json['comment_user_id'], + 'commentId': !exists(json, 'comment_id') ? undefined : json['comment_id'], + }; +} + +export function CommentNotificationActionDataToJSON(value?: CommentNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'entity_id': value.entityId, + 'comment_user_id': value.commentUserId, + 'comment_id': value.commentId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotification.ts new file mode 100644 index 00000000000..ced8c188d3b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentReactionNotificationAction } from './CommentReactionNotificationAction'; +import { + CommentReactionNotificationActionFromJSON, + CommentReactionNotificationActionFromJSONTyped, + CommentReactionNotificationActionToJSON, +} from './CommentReactionNotificationAction'; + +/** + * + * @export + * @interface CommentReactionNotification + */ +export interface CommentReactionNotification { + /** + * + * @type {string} + * @memberof CommentReactionNotification + */ + type: string; + /** + * + * @type {string} + * @memberof CommentReactionNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof CommentReactionNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof CommentReactionNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof CommentReactionNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the CommentReactionNotification interface. + */ +export function instanceOfCommentReactionNotification(value: object): value is CommentReactionNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function CommentReactionNotificationFromJSON(json: any): CommentReactionNotification { + return CommentReactionNotificationFromJSONTyped(json, false); +} + +export function CommentReactionNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentReactionNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(CommentReactionNotificationActionFromJSON)), + }; +} + +export function CommentReactionNotificationToJSON(value?: CommentReactionNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(CommentReactionNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationAction.ts new file mode 100644 index 00000000000..3eaf9fe048e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentReactionNotificationActionData } from './CommentReactionNotificationActionData'; +import { + CommentReactionNotificationActionDataFromJSON, + CommentReactionNotificationActionDataFromJSONTyped, + CommentReactionNotificationActionDataToJSON, +} from './CommentReactionNotificationActionData'; + +/** + * + * @export + * @interface CommentReactionNotificationAction + */ +export interface CommentReactionNotificationAction { + /** + * + * @type {string} + * @memberof CommentReactionNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof CommentReactionNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof CommentReactionNotificationAction + */ + timestamp: number; + /** + * + * @type {CommentReactionNotificationActionData} + * @memberof CommentReactionNotificationAction + */ + data: CommentReactionNotificationActionData; +} + +/** + * Check if a given object implements the CommentReactionNotificationAction interface. + */ +export function instanceOfCommentReactionNotificationAction(value: object): value is CommentReactionNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function CommentReactionNotificationActionFromJSON(json: any): CommentReactionNotificationAction { + return CommentReactionNotificationActionFromJSONTyped(json, false); +} + +export function CommentReactionNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentReactionNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': CommentReactionNotificationActionDataFromJSON(json['data']), + }; +} + +export function CommentReactionNotificationActionToJSON(value?: CommentReactionNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': CommentReactionNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationActionData.ts new file mode 100644 index 00000000000..a9c57c5e0fc --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentReactionNotificationActionData.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CommentReactionNotificationActionData + */ +export interface CommentReactionNotificationActionData { + /** + * + * @type {string} + * @memberof CommentReactionNotificationActionData + */ + type: CommentReactionNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof CommentReactionNotificationActionData + */ + entityId: string; + /** + * + * @type {string} + * @memberof CommentReactionNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof CommentReactionNotificationActionData + */ + reacterUserId: string; + /** + * + * @type {string} + * @memberof CommentReactionNotificationActionData + */ + commentId?: string; +} + + +/** + * @export + */ +export const CommentReactionNotificationActionDataTypeEnum = { + Track: 'Track', + Playlist: 'Playlist', + Album: 'Album' +} as const; +export type CommentReactionNotificationActionDataTypeEnum = typeof CommentReactionNotificationActionDataTypeEnum[keyof typeof CommentReactionNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the CommentReactionNotificationActionData interface. + */ +export function instanceOfCommentReactionNotificationActionData(value: object): value is CommentReactionNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "reacterUserId" in value && value["reacterUserId"] !== undefined; + + return isInstance; +} + +export function CommentReactionNotificationActionDataFromJSON(json: any): CommentReactionNotificationActionData { + return CommentReactionNotificationActionDataFromJSONTyped(json, false); +} + +export function CommentReactionNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentReactionNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'entityId': json['entity_id'], + 'entityUserId': json['entity_user_id'], + 'reacterUserId': json['reacter_user_id'], + 'commentId': !exists(json, 'comment_id') ? undefined : json['comment_id'], + }; +} + +export function CommentReactionNotificationActionDataToJSON(value?: CommentReactionNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'entity_id': value.entityId, + 'entity_user_id': value.entityUserId, + 'reacter_user_id': value.reacterUserId, + 'comment_id': value.commentId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotification.ts new file mode 100644 index 00000000000..1c091a5c7cc --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentThreadNotificationAction } from './CommentThreadNotificationAction'; +import { + CommentThreadNotificationActionFromJSON, + CommentThreadNotificationActionFromJSONTyped, + CommentThreadNotificationActionToJSON, +} from './CommentThreadNotificationAction'; + +/** + * + * @export + * @interface CommentThreadNotification + */ +export interface CommentThreadNotification { + /** + * + * @type {string} + * @memberof CommentThreadNotification + */ + type: string; + /** + * + * @type {string} + * @memberof CommentThreadNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof CommentThreadNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof CommentThreadNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof CommentThreadNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the CommentThreadNotification interface. + */ +export function instanceOfCommentThreadNotification(value: object): value is CommentThreadNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function CommentThreadNotificationFromJSON(json: any): CommentThreadNotification { + return CommentThreadNotificationFromJSONTyped(json, false); +} + +export function CommentThreadNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentThreadNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(CommentThreadNotificationActionFromJSON)), + }; +} + +export function CommentThreadNotificationToJSON(value?: CommentThreadNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(CommentThreadNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationAction.ts new file mode 100644 index 00000000000..524d796f213 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CommentThreadNotificationActionData } from './CommentThreadNotificationActionData'; +import { + CommentThreadNotificationActionDataFromJSON, + CommentThreadNotificationActionDataFromJSONTyped, + CommentThreadNotificationActionDataToJSON, +} from './CommentThreadNotificationActionData'; + +/** + * + * @export + * @interface CommentThreadNotificationAction + */ +export interface CommentThreadNotificationAction { + /** + * + * @type {string} + * @memberof CommentThreadNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof CommentThreadNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof CommentThreadNotificationAction + */ + timestamp: number; + /** + * + * @type {CommentThreadNotificationActionData} + * @memberof CommentThreadNotificationAction + */ + data: CommentThreadNotificationActionData; +} + +/** + * Check if a given object implements the CommentThreadNotificationAction interface. + */ +export function instanceOfCommentThreadNotificationAction(value: object): value is CommentThreadNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function CommentThreadNotificationActionFromJSON(json: any): CommentThreadNotificationAction { + return CommentThreadNotificationActionFromJSONTyped(json, false); +} + +export function CommentThreadNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentThreadNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': CommentThreadNotificationActionDataFromJSON(json['data']), + }; +} + +export function CommentThreadNotificationActionToJSON(value?: CommentThreadNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': CommentThreadNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationActionData.ts new file mode 100644 index 00000000000..33f2e07b5a0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentThreadNotificationActionData.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CommentThreadNotificationActionData + */ +export interface CommentThreadNotificationActionData { + /** + * + * @type {string} + * @memberof CommentThreadNotificationActionData + */ + type: CommentThreadNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof CommentThreadNotificationActionData + */ + entityId: string; + /** + * + * @type {string} + * @memberof CommentThreadNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof CommentThreadNotificationActionData + */ + commentUserId: string; + /** + * + * @type {string} + * @memberof CommentThreadNotificationActionData + */ + commentId?: string; +} + + +/** + * @export + */ +export const CommentThreadNotificationActionDataTypeEnum = { + Track: 'Track', + Playlist: 'Playlist', + Album: 'Album' +} as const; +export type CommentThreadNotificationActionDataTypeEnum = typeof CommentThreadNotificationActionDataTypeEnum[keyof typeof CommentThreadNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the CommentThreadNotificationActionData interface. + */ +export function instanceOfCommentThreadNotificationActionData(value: object): value is CommentThreadNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "commentUserId" in value && value["commentUserId"] !== undefined; + + return isInstance; +} + +export function CommentThreadNotificationActionDataFromJSON(json: any): CommentThreadNotificationActionData { + return CommentThreadNotificationActionDataFromJSONTyped(json, false); +} + +export function CommentThreadNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentThreadNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'entityId': json['entity_id'], + 'entityUserId': json['entity_user_id'], + 'commentUserId': json['comment_user_id'], + 'commentId': !exists(json, 'comment_id') ? undefined : json['comment_id'], + }; +} + +export function CommentThreadNotificationActionDataToJSON(value?: CommentThreadNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'entity_id': value.entityId, + 'entity_user_id': value.entityUserId, + 'comment_user_id': value.commentUserId, + 'comment_id': value.commentId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CosignNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/CosignNotification.ts new file mode 100644 index 00000000000..6304550b1a0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CosignNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CosignNotificationAction } from './CosignNotificationAction'; +import { + CosignNotificationActionFromJSON, + CosignNotificationActionFromJSONTyped, + CosignNotificationActionToJSON, +} from './CosignNotificationAction'; + +/** + * + * @export + * @interface CosignNotification + */ +export interface CosignNotification { + /** + * + * @type {string} + * @memberof CosignNotification + */ + type: string; + /** + * + * @type {string} + * @memberof CosignNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof CosignNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof CosignNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof CosignNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the CosignNotification interface. + */ +export function instanceOfCosignNotification(value: object): value is CosignNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function CosignNotificationFromJSON(json: any): CosignNotification { + return CosignNotificationFromJSONTyped(json, false); +} + +export function CosignNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CosignNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(CosignNotificationActionFromJSON)), + }; +} + +export function CosignNotificationToJSON(value?: CosignNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(CosignNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CosignNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/CosignNotificationAction.ts new file mode 100644 index 00000000000..b977642c07d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CosignNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CosignNotificationActionData } from './CosignNotificationActionData'; +import { + CosignNotificationActionDataFromJSON, + CosignNotificationActionDataFromJSONTyped, + CosignNotificationActionDataToJSON, +} from './CosignNotificationActionData'; + +/** + * + * @export + * @interface CosignNotificationAction + */ +export interface CosignNotificationAction { + /** + * + * @type {string} + * @memberof CosignNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof CosignNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof CosignNotificationAction + */ + timestamp: number; + /** + * + * @type {CosignNotificationActionData} + * @memberof CosignNotificationAction + */ + data: CosignNotificationActionData; +} + +/** + * Check if a given object implements the CosignNotificationAction interface. + */ +export function instanceOfCosignNotificationAction(value: object): value is CosignNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function CosignNotificationActionFromJSON(json: any): CosignNotificationAction { + return CosignNotificationActionFromJSONTyped(json, false); +} + +export function CosignNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CosignNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': CosignNotificationActionDataFromJSON(json['data']), + }; +} + +export function CosignNotificationActionToJSON(value?: CosignNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': CosignNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CosignNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CosignNotificationActionData.ts new file mode 100644 index 00000000000..3163ad98fd6 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CosignNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CosignNotificationActionData + */ +export interface CosignNotificationActionData { + /** + * + * @type {string} + * @memberof CosignNotificationActionData + */ + parentTrackId: string; + /** + * + * @type {string} + * @memberof CosignNotificationActionData + */ + trackId: string; + /** + * + * @type {string} + * @memberof CosignNotificationActionData + */ + trackOwnerId: string; +} + +/** + * Check if a given object implements the CosignNotificationActionData interface. + */ +export function instanceOfCosignNotificationActionData(value: object): value is CosignNotificationActionData { + let isInstance = true; + isInstance = isInstance && "parentTrackId" in value && value["parentTrackId"] !== undefined; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "trackOwnerId" in value && value["trackOwnerId"] !== undefined; + + return isInstance; +} + +export function CosignNotificationActionDataFromJSON(json: any): CosignNotificationActionData { + return CosignNotificationActionDataFromJSONTyped(json, false); +} + +export function CosignNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CosignNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'parentTrackId': json['parent_track_id'], + 'trackId': json['track_id'], + 'trackOwnerId': json['track_owner_id'], + }; +} + +export function CosignNotificationActionDataToJSON(value?: CosignNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'parent_track_id': value.parentTrackId, + 'track_id': value.trackId, + 'track_owner_id': value.trackOwnerId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoverArt.ts b/packages/sdk/src/sdk/api/generated/default/models/CoverArt.ts new file mode 100644 index 00000000000..9e40bf19202 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CoverArt.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CoverArt + */ +export interface CoverArt { + /** + * + * @type {string} + * @memberof CoverArt + */ + _150x150?: string; + /** + * + * @type {string} + * @memberof CoverArt + */ + _480x480?: string; + /** + * + * @type {string} + * @memberof CoverArt + */ + _1000x1000?: string; +} + +/** + * Check if a given object implements the CoverArt interface. + */ +export function instanceOfCoverArt(value: object): value is CoverArt { + let isInstance = true; + + return isInstance; +} + +export function CoverArtFromJSON(json: any): CoverArt { + return CoverArtFromJSONTyped(json, false); +} + +export function CoverArtFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoverArt { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_150x150': !exists(json, '150x150') ? undefined : json['150x150'], + '_480x480': !exists(json, '480x480') ? undefined : json['480x480'], + '_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'], + }; +} + +export function CoverArtToJSON(value?: CoverArt | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '150x150': value._150x150, + '480x480': value._480x480, + '1000x1000': value._1000x1000, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoverPhotoFull.ts b/packages/sdk/src/sdk/api/generated/default/models/CoverPhotoFull.ts new file mode 100644 index 00000000000..4726210b5b8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CoverPhotoFull.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CoverPhotoFull + */ +export interface CoverPhotoFull { + /** + * + * @type {string} + * @memberof CoverPhotoFull + */ + _640x?: string; + /** + * + * @type {string} + * @memberof CoverPhotoFull + */ + _2000x?: string; + /** + * + * @type {Array} + * @memberof CoverPhotoFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the CoverPhotoFull interface. + */ +export function instanceOfCoverPhotoFull(value: object): value is CoverPhotoFull { + let isInstance = true; + + return isInstance; +} + +export function CoverPhotoFullFromJSON(json: any): CoverPhotoFull { + return CoverPhotoFullFromJSONTyped(json, false); +} + +export function CoverPhotoFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoverPhotoFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_640x': !exists(json, '640x') ? undefined : json['640x'], + '_2000x': !exists(json, '2000x') ? undefined : json['2000x'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function CoverPhotoFullToJSON(value?: CoverPhotoFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '640x': value._640x, + '2000x': value._2000x, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateComment201Response.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateComment201Response.ts new file mode 100644 index 00000000000..5a97b5262f7 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateComment201Response.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateComment201Response + */ +export interface CreateComment201Response { + /** + * + * @type {boolean} + * @memberof CreateComment201Response + */ + success?: boolean; + /** + * + * @type {string} + * @memberof CreateComment201Response + */ + transactionHash?: string; +} + +/** + * Check if a given object implements the CreateComment201Response interface. + */ +export function instanceOfCreateComment201Response(value: object): value is CreateComment201Response { + let isInstance = true; + + return isInstance; +} + +export function CreateComment201ResponseFromJSON(json: any): CreateComment201Response { + return CreateComment201ResponseFromJSONTyped(json, false); +} + +export function CreateComment201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateComment201Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'success': !exists(json, 'success') ? undefined : json['success'], + 'transactionHash': !exists(json, 'transaction_hash') ? undefined : json['transaction_hash'], + }; +} + +export function CreateComment201ResponseToJSON(value?: CreateComment201Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'success': value.success, + 'transaction_hash': value.transactionHash, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateCommentRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateCommentRequest.ts new file mode 100644 index 00000000000..c8086256d1b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateCommentRequest.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateCommentRequest + */ +export interface CreateCommentRequest { + /** + * Type of entity being commented on + * @type {string} + * @memberof CreateCommentRequest + */ + entityType: string; + /** + * ID of the entity being commented on + * @type {string} + * @memberof CreateCommentRequest + */ + entityId: string; + /** + * Comment text + * @type {string} + * @memberof CreateCommentRequest + */ + body: string; + /** + * Optional comment ID + * @type {number} + * @memberof CreateCommentRequest + */ + commentId?: number; + /** + * Parent comment ID if this is a reply + * @type {number} + * @memberof CreateCommentRequest + */ + parentId?: number; +} + +/** + * Check if a given object implements the CreateCommentRequest interface. + */ +export function instanceOfCreateCommentRequest(value: object): value is CreateCommentRequest { + let isInstance = true; + isInstance = isInstance && "entityType" in value && value["entityType"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + isInstance = isInstance && "body" in value && value["body"] !== undefined; + + return isInstance; +} + +export function CreateCommentRequestFromJSON(json: any): CreateCommentRequest { + return CreateCommentRequestFromJSONTyped(json, false); +} + +export function CreateCommentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCommentRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityType': json['entityType'], + 'entityId': json['entityId'], + 'body': json['body'], + 'commentId': !exists(json, 'commentId') ? undefined : json['commentId'], + 'parentId': !exists(json, 'parentId') ? undefined : json['parentId'], + }; +} + +export function CreateCommentRequestToJSON(value?: CreateCommentRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entityType': value.entityType, + 'entityId': value.entityId, + 'body': value.body, + 'commentId': value.commentId, + 'parentId': value.parentId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequest.ts new file mode 100644 index 00000000000..088c4dc5589 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequest.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CreateDeveloperAppRequestAppSignature } from './CreateDeveloperAppRequestAppSignature'; +import { + CreateDeveloperAppRequestAppSignatureFromJSON, + CreateDeveloperAppRequestAppSignatureFromJSONTyped, + CreateDeveloperAppRequestAppSignatureToJSON, +} from './CreateDeveloperAppRequestAppSignature'; + +/** + * + * @export + * @interface CreateDeveloperAppRequest + */ +export interface CreateDeveloperAppRequest { + /** + * Developer app name + * @type {string} + * @memberof CreateDeveloperAppRequest + */ + name: string; + /** + * App description + * @type {string} + * @memberof CreateDeveloperAppRequest + */ + description: string; + /** + * App logo/image URL (camelCase) + * @type {string} + * @memberof CreateDeveloperAppRequest + */ + imageUrl: string; + /** + * + * @type {CreateDeveloperAppRequestAppSignature} + * @memberof CreateDeveloperAppRequest + */ + appSignature: CreateDeveloperAppRequestAppSignature; +} + +/** + * Check if a given object implements the CreateDeveloperAppRequest interface. + */ +export function instanceOfCreateDeveloperAppRequest(value: object): value is CreateDeveloperAppRequest { + let isInstance = true; + isInstance = isInstance && "name" in value && value["name"] !== undefined; + isInstance = isInstance && "description" in value && value["description"] !== undefined; + isInstance = isInstance && "imageUrl" in value && value["imageUrl"] !== undefined; + isInstance = isInstance && "appSignature" in value && value["appSignature"] !== undefined; + + return isInstance; +} + +export function CreateDeveloperAppRequestFromJSON(json: any): CreateDeveloperAppRequest { + return CreateDeveloperAppRequestFromJSONTyped(json, false); +} + +export function CreateDeveloperAppRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateDeveloperAppRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': json['description'], + 'imageUrl': json['imageUrl'], + 'appSignature': CreateDeveloperAppRequestAppSignatureFromJSON(json['appSignature']), + }; +} + +export function CreateDeveloperAppRequestToJSON(value?: CreateDeveloperAppRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + 'imageUrl': value.imageUrl, + 'appSignature': CreateDeveloperAppRequestAppSignatureToJSON(value.appSignature), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequestAppSignature.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequestAppSignature.ts new file mode 100644 index 00000000000..f607bd5a67d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateDeveloperAppRequestAppSignature.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateDeveloperAppRequestAppSignature + */ +export interface CreateDeveloperAppRequestAppSignature { + /** + * Signed message + * @type {string} + * @memberof CreateDeveloperAppRequestAppSignature + */ + message: string; + /** + * Signature + * @type {string} + * @memberof CreateDeveloperAppRequestAppSignature + */ + signature: string; +} + +/** + * Check if a given object implements the CreateDeveloperAppRequestAppSignature interface. + */ +export function instanceOfCreateDeveloperAppRequestAppSignature(value: object): value is CreateDeveloperAppRequestAppSignature { + let isInstance = true; + isInstance = isInstance && "message" in value && value["message"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + + return isInstance; +} + +export function CreateDeveloperAppRequestAppSignatureFromJSON(json: any): CreateDeveloperAppRequestAppSignature { + return CreateDeveloperAppRequestAppSignatureFromJSONTyped(json, false); +} + +export function CreateDeveloperAppRequestAppSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateDeveloperAppRequestAppSignature { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'message': json['message'], + 'signature': json['signature'], + }; +} + +export function CreateDeveloperAppRequestAppSignatureToJSON(value?: CreateDeveloperAppRequestAppSignature | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'message': value.message, + 'signature': value.signature, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateNotification.ts new file mode 100644 index 00000000000..f299c791d0b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CreateNotificationAction } from './CreateNotificationAction'; +import { + CreateNotificationActionFromJSON, + CreateNotificationActionFromJSONTyped, + CreateNotificationActionToJSON, +} from './CreateNotificationAction'; + +/** + * + * @export + * @interface CreateNotification + */ +export interface CreateNotification { + /** + * + * @type {string} + * @memberof CreateNotification + */ + type: string; + /** + * + * @type {string} + * @memberof CreateNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof CreateNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof CreateNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof CreateNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the CreateNotification interface. + */ +export function instanceOfCreateNotification(value: object): value is CreateNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function CreateNotificationFromJSON(json: any): CreateNotification { + return CreateNotificationFromJSONTyped(json, false); +} + +export function CreateNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(CreateNotificationActionFromJSON)), + }; +} + +export function CreateNotificationToJSON(value?: CreateNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(CreateNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateNotificationAction.ts new file mode 100644 index 00000000000..dd34773d5d4 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CreateNotificationActionData } from './CreateNotificationActionData'; +import { + CreateNotificationActionDataFromJSON, + CreateNotificationActionDataFromJSONTyped, + CreateNotificationActionDataToJSON, +} from './CreateNotificationActionData'; + +/** + * + * @export + * @interface CreateNotificationAction + */ +export interface CreateNotificationAction { + /** + * + * @type {string} + * @memberof CreateNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof CreateNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof CreateNotificationAction + */ + timestamp: number; + /** + * + * @type {CreateNotificationActionData} + * @memberof CreateNotificationAction + */ + data: CreateNotificationActionData; +} + +/** + * Check if a given object implements the CreateNotificationAction interface. + */ +export function instanceOfCreateNotificationAction(value: object): value is CreateNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function CreateNotificationActionFromJSON(json: any): CreateNotificationAction { + return CreateNotificationActionFromJSONTyped(json, false); +} + +export function CreateNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': CreateNotificationActionDataFromJSON(json['data']), + }; +} + +export function CreateNotificationActionToJSON(value?: CreateNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': CreateNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateNotificationActionData.ts new file mode 100644 index 00000000000..3fd333b580b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateNotificationActionData.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { + CreatePlaylistNotificationActionData, + instanceOfCreatePlaylistNotificationActionData, + CreatePlaylistNotificationActionDataFromJSON, + CreatePlaylistNotificationActionDataFromJSONTyped, + CreatePlaylistNotificationActionDataToJSON, +} from './CreatePlaylistNotificationActionData'; +import { + CreateTrackNotificationActionData, + instanceOfCreateTrackNotificationActionData, + CreateTrackNotificationActionDataFromJSON, + CreateTrackNotificationActionDataFromJSONTyped, + CreateTrackNotificationActionDataToJSON, +} from './CreateTrackNotificationActionData'; + +/** + * @type CreateNotificationActionData + * + * @export + */ +export type CreateNotificationActionData = CreatePlaylistNotificationActionData | CreateTrackNotificationActionData; + +export function CreateNotificationActionDataFromJSON(json: any): CreateNotificationActionData { + return CreateNotificationActionDataFromJSONTyped(json, false); +} + +export function CreateNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { ...CreatePlaylistNotificationActionDataFromJSONTyped(json, true), ...CreateTrackNotificationActionDataFromJSONTyped(json, true) }; +} + +export function CreateNotificationActionDataToJSON(value?: CreateNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + + if (instanceOfCreatePlaylistNotificationActionData(value)) { + return CreatePlaylistNotificationActionDataToJSON(value as CreatePlaylistNotificationActionData); + } + if (instanceOfCreateTrackNotificationActionData(value)) { + return CreateTrackNotificationActionDataToJSON(value as CreateTrackNotificationActionData); + } + + return {}; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylist201Response.ts b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylist201Response.ts new file mode 100644 index 00000000000..80853255aeb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylist201Response.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreatePlaylist201Response + */ +export interface CreatePlaylist201Response { + /** + * + * @type {boolean} + * @memberof CreatePlaylist201Response + */ + success?: boolean; + /** + * + * @type {string} + * @memberof CreatePlaylist201Response + */ + transactionHash?: string; + /** + * + * @type {string} + * @memberof CreatePlaylist201Response + */ + playlistId?: string; +} + +/** + * Check if a given object implements the CreatePlaylist201Response interface. + */ +export function instanceOfCreatePlaylist201Response(value: object): value is CreatePlaylist201Response { + let isInstance = true; + + return isInstance; +} + +export function CreatePlaylist201ResponseFromJSON(json: any): CreatePlaylist201Response { + return CreatePlaylist201ResponseFromJSONTyped(json, false); +} + +export function CreatePlaylist201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePlaylist201Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'success': !exists(json, 'success') ? undefined : json['success'], + 'transactionHash': !exists(json, 'transaction_hash') ? undefined : json['transaction_hash'], + 'playlistId': !exists(json, 'playlist_id') ? undefined : json['playlist_id'], + }; +} + +export function CreatePlaylist201ResponseToJSON(value?: CreatePlaylist201Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'success': value.success, + 'transaction_hash': value.transactionHash, + 'playlist_id': value.playlistId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistNotificationActionData.ts new file mode 100644 index 00000000000..83449e5464c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreatePlaylistNotificationActionData + */ +export interface CreatePlaylistNotificationActionData { + /** + * + * @type {boolean} + * @memberof CreatePlaylistNotificationActionData + */ + isAlbum: boolean; + /** + * + * @type {string} + * @memberof CreatePlaylistNotificationActionData + */ + playlistId: string; +} + +/** + * Check if a given object implements the CreatePlaylistNotificationActionData interface. + */ +export function instanceOfCreatePlaylistNotificationActionData(value: object): value is CreatePlaylistNotificationActionData { + let isInstance = true; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + + return isInstance; +} + +export function CreatePlaylistNotificationActionDataFromJSON(json: any): CreatePlaylistNotificationActionData { + return CreatePlaylistNotificationActionDataFromJSONTyped(json, false); +} + +export function CreatePlaylistNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePlaylistNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'isAlbum': json['is_album'], + 'playlistId': json['playlist_id'], + }; +} + +export function CreatePlaylistNotificationActionDataToJSON(value?: CreatePlaylistNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'is_album': value.isAlbum, + 'playlist_id': value.playlistId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequest.ts new file mode 100644 index 00000000000..2d5b29256db --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequest.ts @@ -0,0 +1,194 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CreatePlaylistRequestPlaylistContentsInner } from './CreatePlaylistRequestPlaylistContentsInner'; +import { + CreatePlaylistRequestPlaylistContentsInnerFromJSON, + CreatePlaylistRequestPlaylistContentsInnerFromJSONTyped, + CreatePlaylistRequestPlaylistContentsInnerToJSON, +} from './CreatePlaylistRequestPlaylistContentsInner'; + +/** + * + * @export + * @interface CreatePlaylistRequest + */ +export interface CreatePlaylistRequest { + /** + * Optional playlist ID (will be generated if not provided) + * @type {string} + * @memberof CreatePlaylistRequest + */ + playlistId?: string; + /** + * Playlist or album name + * @type {string} + * @memberof CreatePlaylistRequest + */ + playlistName: string; + /** + * Playlist description + * @type {string} + * @memberof CreatePlaylistRequest + */ + description?: string; + /** + * Whether the playlist is private + * @type {boolean} + * @memberof CreatePlaylistRequest + */ + isPrivate?: boolean; + /** + * Whether this is an album + * @type {boolean} + * @memberof CreatePlaylistRequest + */ + isAlbum?: boolean; + /** + * Playlist genre + * @type {string} + * @memberof CreatePlaylistRequest + */ + genre?: string; + /** + * Playlist mood + * @type {string} + * @memberof CreatePlaylistRequest + */ + mood?: string; + /** + * Comma-separated tags + * @type {string} + * @memberof CreatePlaylistRequest + */ + tags?: string; + /** + * License type + * @type {string} + * @memberof CreatePlaylistRequest + */ + license?: string; + /** + * Universal Product Code (for albums) + * @type {string} + * @memberof CreatePlaylistRequest + */ + upc?: string; + /** + * Release date + * @type {string} + * @memberof CreatePlaylistRequest + */ + releaseDate?: string; + /** + * IPFS CID for cover art + * @type {string} + * @memberof CreatePlaylistRequest + */ + coverArtCid?: string; + /** + * Array of tracks in the playlist + * @type {Array} + * @memberof CreatePlaylistRequest + */ + playlistContents?: Array; + /** + * DDEX application identifier + * @type {string} + * @memberof CreatePlaylistRequest + */ + ddexApp?: string; + /** + * Parental warning type + * @type {string} + * @memberof CreatePlaylistRequest + */ + parentalWarningType?: string; + /** + * Whether the image is autogenerated + * @type {boolean} + * @memberof CreatePlaylistRequest + */ + isImageAutogenerated?: boolean; +} + +/** + * Check if a given object implements the CreatePlaylistRequest interface. + */ +export function instanceOfCreatePlaylistRequest(value: object): value is CreatePlaylistRequest { + let isInstance = true; + isInstance = isInstance && "playlistName" in value && value["playlistName"] !== undefined; + + return isInstance; +} + +export function CreatePlaylistRequestFromJSON(json: any): CreatePlaylistRequest { + return CreatePlaylistRequestFromJSONTyped(json, false); +} + +export function CreatePlaylistRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePlaylistRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'playlistId': !exists(json, 'playlist_id') ? undefined : json['playlist_id'], + 'playlistName': json['playlist_name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'isPrivate': !exists(json, 'is_private') ? undefined : json['is_private'], + 'isAlbum': !exists(json, 'is_album') ? undefined : json['is_album'], + 'genre': !exists(json, 'genre') ? undefined : json['genre'], + 'mood': !exists(json, 'mood') ? undefined : json['mood'], + 'tags': !exists(json, 'tags') ? undefined : json['tags'], + 'license': !exists(json, 'license') ? undefined : json['license'], + 'upc': !exists(json, 'upc') ? undefined : json['upc'], + 'releaseDate': !exists(json, 'release_date') ? undefined : json['release_date'], + 'coverArtCid': !exists(json, 'cover_art_cid') ? undefined : json['cover_art_cid'], + 'playlistContents': !exists(json, 'playlist_contents') ? undefined : ((json['playlist_contents'] as Array).map(CreatePlaylistRequestPlaylistContentsInnerFromJSON)), + 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + 'isImageAutogenerated': !exists(json, 'is_image_autogenerated') ? undefined : json['is_image_autogenerated'], + }; +} + +export function CreatePlaylistRequestToJSON(value?: CreatePlaylistRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'playlist_id': value.playlistId, + 'playlist_name': value.playlistName, + 'description': value.description, + 'is_private': value.isPrivate, + 'is_album': value.isAlbum, + 'genre': value.genre, + 'mood': value.mood, + 'tags': value.tags, + 'license': value.license, + 'upc': value.upc, + 'release_date': value.releaseDate, + 'cover_art_cid': value.coverArtCid, + 'playlist_contents': value.playlistContents === undefined ? undefined : ((value.playlistContents as Array).map(CreatePlaylistRequestPlaylistContentsInnerToJSON)), + 'ddex_app': value.ddexApp, + 'parental_warning_type': value.parentalWarningType, + 'is_image_autogenerated': value.isImageAutogenerated, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequestPlaylistContentsInner.ts b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequestPlaylistContentsInner.ts new file mode 100644 index 00000000000..d34ad3079df --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreatePlaylistRequestPlaylistContentsInner.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreatePlaylistRequestPlaylistContentsInner + */ +export interface CreatePlaylistRequestPlaylistContentsInner { + /** + * Track ID + * @type {string} + * @memberof CreatePlaylistRequestPlaylistContentsInner + */ + trackId: string; + /** + * Unix timestamp when track was added + * @type {number} + * @memberof CreatePlaylistRequestPlaylistContentsInner + */ + timestamp: number; + /** + * Metadata timestamp + * @type {number} + * @memberof CreatePlaylistRequestPlaylistContentsInner + */ + metadataTimestamp?: number; +} + +/** + * Check if a given object implements the CreatePlaylistRequestPlaylistContentsInner interface. + */ +export function instanceOfCreatePlaylistRequestPlaylistContentsInner(value: object): value is CreatePlaylistRequestPlaylistContentsInner { + let isInstance = true; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + + return isInstance; +} + +export function CreatePlaylistRequestPlaylistContentsInnerFromJSON(json: any): CreatePlaylistRequestPlaylistContentsInner { + return CreatePlaylistRequestPlaylistContentsInnerFromJSONTyped(json, false); +} + +export function CreatePlaylistRequestPlaylistContentsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePlaylistRequestPlaylistContentsInner { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': json['track_id'], + 'timestamp': json['timestamp'], + 'metadataTimestamp': !exists(json, 'metadata_timestamp') ? undefined : json['metadata_timestamp'], + }; +} + +export function CreatePlaylistRequestPlaylistContentsInnerToJSON(value?: CreatePlaylistRequestPlaylistContentsInner | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + 'timestamp': value.timestamp, + 'metadata_timestamp': value.metadataTimestamp, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateTrack201Response.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateTrack201Response.ts new file mode 100644 index 00000000000..93622033c86 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateTrack201Response.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateTrack201Response + */ +export interface CreateTrack201Response { + /** + * + * @type {boolean} + * @memberof CreateTrack201Response + */ + success?: boolean; + /** + * + * @type {string} + * @memberof CreateTrack201Response + */ + transactionHash?: string; + /** + * + * @type {string} + * @memberof CreateTrack201Response + */ + trackId?: string; +} + +/** + * Check if a given object implements the CreateTrack201Response interface. + */ +export function instanceOfCreateTrack201Response(value: object): value is CreateTrack201Response { + let isInstance = true; + + return isInstance; +} + +export function CreateTrack201ResponseFromJSON(json: any): CreateTrack201Response { + return CreateTrack201ResponseFromJSONTyped(json, false); +} + +export function CreateTrack201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTrack201Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'success': !exists(json, 'success') ? undefined : json['success'], + 'transactionHash': !exists(json, 'transaction_hash') ? undefined : json['transaction_hash'], + 'trackId': !exists(json, 'track_id') ? undefined : json['track_id'], + }; +} + +export function CreateTrack201ResponseToJSON(value?: CreateTrack201Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'success': value.success, + 'transaction_hash': value.transactionHash, + 'track_id': value.trackId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateTrackNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateTrackNotificationActionData.ts new file mode 100644 index 00000000000..2ca70b830e6 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateTrackNotificationActionData.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateTrackNotificationActionData + */ +export interface CreateTrackNotificationActionData { + /** + * + * @type {string} + * @memberof CreateTrackNotificationActionData + */ + trackId: string; +} + +/** + * Check if a given object implements the CreateTrackNotificationActionData interface. + */ +export function instanceOfCreateTrackNotificationActionData(value: object): value is CreateTrackNotificationActionData { + let isInstance = true; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + + return isInstance; +} + +export function CreateTrackNotificationActionDataFromJSON(json: any): CreateTrackNotificationActionData { + return CreateTrackNotificationActionDataFromJSONTyped(json, false); +} + +export function CreateTrackNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTrackNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': json['track_id'], + }; +} + +export function CreateTrackNotificationActionDataToJSON(value?: CreateTrackNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateTrackRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateTrackRequest.ts new file mode 100644 index 00000000000..603e8fe57de --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateTrackRequest.ts @@ -0,0 +1,213 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateTrackRequest + */ +export interface CreateTrackRequest { + /** + * Optional track ID (will be generated if not provided) + * @type {string} + * @memberof CreateTrackRequest + */ + trackId?: string; + /** + * Track title + * @type {string} + * @memberof CreateTrackRequest + */ + title: string; + /** + * Track genre + * @type {string} + * @memberof CreateTrackRequest + */ + genre: string; + /** + * Track description + * @type {string} + * @memberof CreateTrackRequest + */ + description?: string; + /** + * Track mood + * @type {string} + * @memberof CreateTrackRequest + */ + mood?: string; + /** + * Comma-separated tags + * @type {string} + * @memberof CreateTrackRequest + */ + tags?: string; + /** + * License type + * @type {string} + * @memberof CreateTrackRequest + */ + license?: string; + /** + * International Standard Recording Code + * @type {string} + * @memberof CreateTrackRequest + */ + isrc?: string; + /** + * International Standard Musical Work Code + * @type {string} + * @memberof CreateTrackRequest + */ + iswc?: string; + /** + * Release date + * @type {string} + * @memberof CreateTrackRequest + */ + releaseDate?: string; + /** + * IPFS CID for the track audio file (required) + * @type {string} + * @memberof CreateTrackRequest + */ + trackCid: string; + /** + * IPFS CID for cover art + * @type {string} + * @memberof CreateTrackRequest + */ + coverArtCid?: string; + /** + * IPFS CID for the track preview + * @type {string} + * @memberof CreateTrackRequest + */ + previewCid?: string; + /** + * Preview start time in seconds + * @type {number} + * @memberof CreateTrackRequest + */ + previewStartSeconds?: number; + /** + * Track duration in seconds + * @type {number} + * @memberof CreateTrackRequest + */ + duration?: number; + /** + * Whether the track is downloadable + * @type {boolean} + * @memberof CreateTrackRequest + */ + downloadable?: boolean; + /** + * Whether the track is unlisted + * @type {boolean} + * @memberof CreateTrackRequest + */ + isUnlisted?: boolean; + /** + * DDEX application identifier + * @type {string} + * @memberof CreateTrackRequest + */ + ddexApp?: string; + /** + * Parental warning type + * @type {string} + * @memberof CreateTrackRequest + */ + parentalWarningType?: string; +} + +/** + * Check if a given object implements the CreateTrackRequest interface. + */ +export function instanceOfCreateTrackRequest(value: object): value is CreateTrackRequest { + let isInstance = true; + isInstance = isInstance && "title" in value && value["title"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "trackCid" in value && value["trackCid"] !== undefined; + + return isInstance; +} + +export function CreateTrackRequestFromJSON(json: any): CreateTrackRequest { + return CreateTrackRequestFromJSONTyped(json, false); +} + +export function CreateTrackRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTrackRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': !exists(json, 'track_id') ? undefined : json['track_id'], + 'title': json['title'], + 'genre': json['genre'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'mood': !exists(json, 'mood') ? undefined : json['mood'], + 'tags': !exists(json, 'tags') ? undefined : json['tags'], + 'license': !exists(json, 'license') ? undefined : json['license'], + 'isrc': !exists(json, 'isrc') ? undefined : json['isrc'], + 'iswc': !exists(json, 'iswc') ? undefined : json['iswc'], + 'releaseDate': !exists(json, 'release_date') ? undefined : json['release_date'], + 'trackCid': json['track_cid'], + 'coverArtCid': !exists(json, 'cover_art_cid') ? undefined : json['cover_art_cid'], + 'previewCid': !exists(json, 'preview_cid') ? undefined : json['preview_cid'], + 'previewStartSeconds': !exists(json, 'preview_start_seconds') ? undefined : json['preview_start_seconds'], + 'duration': !exists(json, 'duration') ? undefined : json['duration'], + 'downloadable': !exists(json, 'downloadable') ? undefined : json['downloadable'], + 'isUnlisted': !exists(json, 'is_unlisted') ? undefined : json['is_unlisted'], + 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + }; +} + +export function CreateTrackRequestToJSON(value?: CreateTrackRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + 'title': value.title, + 'genre': value.genre, + 'description': value.description, + 'mood': value.mood, + 'tags': value.tags, + 'license': value.license, + 'isrc': value.isrc, + 'iswc': value.iswc, + 'release_date': value.releaseDate, + 'track_cid': value.trackCid, + 'cover_art_cid': value.coverArtCid, + 'preview_cid': value.previewCid, + 'preview_start_seconds': value.previewStartSeconds, + 'duration': value.duration, + 'downloadable': value.downloadable, + 'is_unlisted': value.isUnlisted, + 'ddex_app': value.ddexApp, + 'parental_warning_type': value.parentalWarningType, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateUser201Response.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateUser201Response.ts new file mode 100644 index 00000000000..0033b209e72 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateUser201Response.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateUser201Response + */ +export interface CreateUser201Response { + /** + * + * @type {boolean} + * @memberof CreateUser201Response + */ + success?: boolean; + /** + * + * @type {string} + * @memberof CreateUser201Response + */ + transactionHash?: string; + /** + * + * @type {string} + * @memberof CreateUser201Response + */ + userId?: string; +} + +/** + * Check if a given object implements the CreateUser201Response interface. + */ +export function instanceOfCreateUser201Response(value: object): value is CreateUser201Response { + let isInstance = true; + + return isInstance; +} + +export function CreateUser201ResponseFromJSON(json: any): CreateUser201Response { + return CreateUser201ResponseFromJSONTyped(json, false); +} + +export function CreateUser201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUser201Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'success': !exists(json, 'success') ? undefined : json['success'], + 'transactionHash': !exists(json, 'transaction_hash') ? undefined : json['transaction_hash'], + 'userId': !exists(json, 'user_id') ? undefined : json['user_id'], + }; +} + +export function CreateUser201ResponseToJSON(value?: CreateUser201Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'success': value.success, + 'transaction_hash': value.transactionHash, + 'user_id': value.userId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequest.ts new file mode 100644 index 00000000000..559958a1121 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequest.ts @@ -0,0 +1,196 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateUserRequest + */ +export interface CreateUserRequest { + /** + * Optional user ID (will be generated if not provided) + * @type {string} + * @memberof CreateUserRequest + */ + userId?: string; + /** + * User handle (unique username) + * @type {string} + * @memberof CreateUserRequest + */ + handle: string; + /** + * Wallet address (required) + * @type {string} + * @memberof CreateUserRequest + */ + wallet: string; + /** + * Display name + * @type {string} + * @memberof CreateUserRequest + */ + name?: string; + /** + * User bio + * @type {string} + * @memberof CreateUserRequest + */ + bio?: string; + /** + * User location + * @type {string} + * @memberof CreateUserRequest + */ + location?: string; + /** + * Website URL + * @type {string} + * @memberof CreateUserRequest + */ + website?: string; + /** + * Donation link + * @type {string} + * @memberof CreateUserRequest + */ + donation?: string; + /** + * Twitter handle (without @) + * @type {string} + * @memberof CreateUserRequest + */ + twitterHandle?: string; + /** + * Instagram handle (without @) + * @type {string} + * @memberof CreateUserRequest + */ + instagramHandle?: string; + /** + * TikTok handle (without @) + * @type {string} + * @memberof CreateUserRequest + */ + tiktokHandle?: string; + /** + * Profile picture CID or URL + * @type {string} + * @memberof CreateUserRequest + */ + profilePicture?: string; + /** + * Profile picture sizes metadata + * @type {string} + * @memberof CreateUserRequest + */ + profilePictureSizes?: string; + /** + * Cover photo CID or URL + * @type {string} + * @memberof CreateUserRequest + */ + coverPhoto?: string; + /** + * Cover photo sizes metadata + * @type {string} + * @memberof CreateUserRequest + */ + coverPhotoSizes?: string; + /** + * Whether to allow AI attribution + * @type {boolean} + * @memberof CreateUserRequest + */ + allowAiAttribution?: boolean; + /** + * Solana USDC payout wallet address + * @type {string} + * @memberof CreateUserRequest + */ + splUsdcPayoutWallet?: string; +} + +/** + * Check if a given object implements the CreateUserRequest interface. + */ +export function instanceOfCreateUserRequest(value: object): value is CreateUserRequest { + let isInstance = true; + isInstance = isInstance && "handle" in value && value["handle"] !== undefined; + isInstance = isInstance && "wallet" in value && value["wallet"] !== undefined; + + return isInstance; +} + +export function CreateUserRequestFromJSON(json: any): CreateUserRequest { + return CreateUserRequestFromJSONTyped(json, false); +} + +export function CreateUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUserRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': !exists(json, 'user_id') ? undefined : json['user_id'], + 'handle': json['handle'], + 'wallet': json['wallet'], + 'name': !exists(json, 'name') ? undefined : json['name'], + 'bio': !exists(json, 'bio') ? undefined : json['bio'], + 'location': !exists(json, 'location') ? undefined : json['location'], + 'website': !exists(json, 'website') ? undefined : json['website'], + 'donation': !exists(json, 'donation') ? undefined : json['donation'], + 'twitterHandle': !exists(json, 'twitter_handle') ? undefined : json['twitter_handle'], + 'instagramHandle': !exists(json, 'instagram_handle') ? undefined : json['instagram_handle'], + 'tiktokHandle': !exists(json, 'tiktok_handle') ? undefined : json['tiktok_handle'], + 'profilePicture': !exists(json, 'profile_picture') ? undefined : json['profile_picture'], + 'profilePictureSizes': !exists(json, 'profile_picture_sizes') ? undefined : json['profile_picture_sizes'], + 'coverPhoto': !exists(json, 'cover_photo') ? undefined : json['cover_photo'], + 'coverPhotoSizes': !exists(json, 'cover_photo_sizes') ? undefined : json['cover_photo_sizes'], + 'allowAiAttribution': !exists(json, 'allow_ai_attribution') ? undefined : json['allow_ai_attribution'], + 'splUsdcPayoutWallet': !exists(json, 'spl_usdc_payout_wallet') ? undefined : json['spl_usdc_payout_wallet'], + }; +} + +export function CreateUserRequestToJSON(value?: CreateUserRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user_id': value.userId, + 'handle': value.handle, + 'wallet': value.wallet, + 'name': value.name, + 'bio': value.bio, + 'location': value.location, + 'website': value.website, + 'donation': value.donation, + 'twitter_handle': value.twitterHandle, + 'instagram_handle': value.instagramHandle, + 'tiktok_handle': value.tiktokHandle, + 'profile_picture': value.profilePicture, + 'profile_picture_sizes': value.profilePictureSizes, + 'cover_photo': value.coverPhoto, + 'cover_photo_sizes': value.coverPhotoSizes, + 'allow_ai_attribution': value.allowAiAttribution, + 'spl_usdc_payout_wallet': value.splUsdcPayoutWallet, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/DataAndType.ts b/packages/sdk/src/sdk/api/generated/default/models/DataAndType.ts new file mode 100644 index 00000000000..d6622754bfb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/DataAndType.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CidData } from './CidData'; +import { + CidDataFromJSON, + CidDataFromJSONTyped, + CidDataToJSON, +} from './CidData'; + +/** + * + * @export + * @interface DataAndType + */ +export interface DataAndType { + /** + * + * @type {string} + * @memberof DataAndType + */ + type?: string; + /** + * + * @type {CidData} + * @memberof DataAndType + */ + data?: CidData; +} + +/** + * Check if a given object implements the DataAndType interface. + */ +export function instanceOfDataAndType(value: object): value is DataAndType { + let isInstance = true; + + return isInstance; +} + +export function DataAndTypeFromJSON(json: any): DataAndType { + return DataAndTypeFromJSONTyped(json, false); +} + +export function DataAndTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataAndType { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': !exists(json, 'type') ? undefined : json['type'], + 'data': !exists(json, 'data') ? undefined : CidDataFromJSON(json['data']), + }; +} + +export function DataAndTypeToJSON(value?: DataAndType | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'data': CidDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotification.ts new file mode 100644 index 00000000000..079bc8d5517 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndedNotificationAction } from './FanRemixContestEndedNotificationAction'; +import { + FanRemixContestEndedNotificationActionFromJSON, + FanRemixContestEndedNotificationActionFromJSONTyped, + FanRemixContestEndedNotificationActionToJSON, +} from './FanRemixContestEndedNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestEndedNotification + */ +export interface FanRemixContestEndedNotification { + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestEndedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestEndedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestEndedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestEndedNotification interface. + */ +export function instanceOfFanRemixContestEndedNotification(value: object): value is FanRemixContestEndedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndedNotificationFromJSON(json: any): FanRemixContestEndedNotification { + return FanRemixContestEndedNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestEndedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestEndedNotificationActionFromJSON)), + }; +} + +export function FanRemixContestEndedNotificationToJSON(value?: FanRemixContestEndedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestEndedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationAction.ts new file mode 100644 index 00000000000..0f2d56cecf2 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndedNotificationActionData } from './FanRemixContestEndedNotificationActionData'; +import { + FanRemixContestEndedNotificationActionDataFromJSON, + FanRemixContestEndedNotificationActionDataFromJSONTyped, + FanRemixContestEndedNotificationActionDataToJSON, +} from './FanRemixContestEndedNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestEndedNotificationAction + */ +export interface FanRemixContestEndedNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestEndedNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestEndedNotificationActionData} + * @memberof FanRemixContestEndedNotificationAction + */ + data: FanRemixContestEndedNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestEndedNotificationAction interface. + */ +export function instanceOfFanRemixContestEndedNotificationAction(value: object): value is FanRemixContestEndedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndedNotificationActionFromJSON(json: any): FanRemixContestEndedNotificationAction { + return FanRemixContestEndedNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestEndedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestEndedNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestEndedNotificationActionToJSON(value?: FanRemixContestEndedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestEndedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationActionData.ts new file mode 100644 index 00000000000..efa269f9166 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestEndedNotificationActionData + */ +export interface FanRemixContestEndedNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestEndedNotificationActionData interface. + */ +export function instanceOfFanRemixContestEndedNotificationActionData(value: object): value is FanRemixContestEndedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndedNotificationActionDataFromJSON(json: any): FanRemixContestEndedNotificationActionData { + return FanRemixContestEndedNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestEndedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestEndedNotificationActionDataToJSON(value?: FanRemixContestEndedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotification.ts new file mode 100644 index 00000000000..476bd4b6eb2 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndingSoonNotificationAction } from './FanRemixContestEndingSoonNotificationAction'; +import { + FanRemixContestEndingSoonNotificationActionFromJSON, + FanRemixContestEndingSoonNotificationActionFromJSONTyped, + FanRemixContestEndingSoonNotificationActionToJSON, +} from './FanRemixContestEndingSoonNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestEndingSoonNotification + */ +export interface FanRemixContestEndingSoonNotification { + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestEndingSoonNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestEndingSoonNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestEndingSoonNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestEndingSoonNotification interface. + */ +export function instanceOfFanRemixContestEndingSoonNotification(value: object): value is FanRemixContestEndingSoonNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndingSoonNotificationFromJSON(json: any): FanRemixContestEndingSoonNotification { + return FanRemixContestEndingSoonNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestEndingSoonNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndingSoonNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestEndingSoonNotificationActionFromJSON)), + }; +} + +export function FanRemixContestEndingSoonNotificationToJSON(value?: FanRemixContestEndingSoonNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestEndingSoonNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationAction.ts new file mode 100644 index 00000000000..3beb168abce --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndingSoonNotificationActionData } from './FanRemixContestEndingSoonNotificationActionData'; +import { + FanRemixContestEndingSoonNotificationActionDataFromJSON, + FanRemixContestEndingSoonNotificationActionDataFromJSONTyped, + FanRemixContestEndingSoonNotificationActionDataToJSON, +} from './FanRemixContestEndingSoonNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestEndingSoonNotificationAction + */ +export interface FanRemixContestEndingSoonNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestEndingSoonNotificationActionData} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + data: FanRemixContestEndingSoonNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestEndingSoonNotificationAction interface. + */ +export function instanceOfFanRemixContestEndingSoonNotificationAction(value: object): value is FanRemixContestEndingSoonNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndingSoonNotificationActionFromJSON(json: any): FanRemixContestEndingSoonNotificationAction { + return FanRemixContestEndingSoonNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestEndingSoonNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndingSoonNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestEndingSoonNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestEndingSoonNotificationActionToJSON(value?: FanRemixContestEndingSoonNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestEndingSoonNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationActionData.ts new file mode 100644 index 00000000000..a66e046cfcd --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestEndingSoonNotificationActionData + */ +export interface FanRemixContestEndingSoonNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestEndingSoonNotificationActionData interface. + */ +export function instanceOfFanRemixContestEndingSoonNotificationActionData(value: object): value is FanRemixContestEndingSoonNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndingSoonNotificationActionDataFromJSON(json: any): FanRemixContestEndingSoonNotificationActionData { + return FanRemixContestEndingSoonNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestEndingSoonNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndingSoonNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestEndingSoonNotificationActionDataToJSON(value?: FanRemixContestEndingSoonNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotification.ts new file mode 100644 index 00000000000..053bfb735e5 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestStartedNotificationAction } from './FanRemixContestStartedNotificationAction'; +import { + FanRemixContestStartedNotificationActionFromJSON, + FanRemixContestStartedNotificationActionFromJSONTyped, + FanRemixContestStartedNotificationActionToJSON, +} from './FanRemixContestStartedNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestStartedNotification + */ +export interface FanRemixContestStartedNotification { + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestStartedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestStartedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestStartedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestStartedNotification interface. + */ +export function instanceOfFanRemixContestStartedNotification(value: object): value is FanRemixContestStartedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestStartedNotificationFromJSON(json: any): FanRemixContestStartedNotification { + return FanRemixContestStartedNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestStartedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestStartedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestStartedNotificationActionFromJSON)), + }; +} + +export function FanRemixContestStartedNotificationToJSON(value?: FanRemixContestStartedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestStartedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationAction.ts new file mode 100644 index 00000000000..0ffc61808ba --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestStartedNotificationActionData } from './FanRemixContestStartedNotificationActionData'; +import { + FanRemixContestStartedNotificationActionDataFromJSON, + FanRemixContestStartedNotificationActionDataFromJSONTyped, + FanRemixContestStartedNotificationActionDataToJSON, +} from './FanRemixContestStartedNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestStartedNotificationAction + */ +export interface FanRemixContestStartedNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestStartedNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestStartedNotificationActionData} + * @memberof FanRemixContestStartedNotificationAction + */ + data: FanRemixContestStartedNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestStartedNotificationAction interface. + */ +export function instanceOfFanRemixContestStartedNotificationAction(value: object): value is FanRemixContestStartedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestStartedNotificationActionFromJSON(json: any): FanRemixContestStartedNotificationAction { + return FanRemixContestStartedNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestStartedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestStartedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestStartedNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestStartedNotificationActionToJSON(value?: FanRemixContestStartedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestStartedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationActionData.ts new file mode 100644 index 00000000000..dee62c2e8fd --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestStartedNotificationActionData + */ +export interface FanRemixContestStartedNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestStartedNotificationActionData interface. + */ +export function instanceOfFanRemixContestStartedNotificationActionData(value: object): value is FanRemixContestStartedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestStartedNotificationActionDataFromJSON(json: any): FanRemixContestStartedNotificationActionData { + return FanRemixContestStartedNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestStartedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestStartedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestStartedNotificationActionDataToJSON(value?: FanRemixContestStartedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotification.ts new file mode 100644 index 00000000000..fcd3c3b9925 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestWinnersSelectedNotificationAction } from './FanRemixContestWinnersSelectedNotificationAction'; +import { + FanRemixContestWinnersSelectedNotificationActionFromJSON, + FanRemixContestWinnersSelectedNotificationActionFromJSONTyped, + FanRemixContestWinnersSelectedNotificationActionToJSON, +} from './FanRemixContestWinnersSelectedNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestWinnersSelectedNotification + */ +export interface FanRemixContestWinnersSelectedNotification { + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestWinnersSelectedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestWinnersSelectedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestWinnersSelectedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestWinnersSelectedNotification interface. + */ +export function instanceOfFanRemixContestWinnersSelectedNotification(value: object): value is FanRemixContestWinnersSelectedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestWinnersSelectedNotificationFromJSON(json: any): FanRemixContestWinnersSelectedNotification { + return FanRemixContestWinnersSelectedNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestWinnersSelectedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestWinnersSelectedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestWinnersSelectedNotificationActionFromJSON)), + }; +} + +export function FanRemixContestWinnersSelectedNotificationToJSON(value?: FanRemixContestWinnersSelectedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestWinnersSelectedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationAction.ts new file mode 100644 index 00000000000..6167520d26d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestWinnersSelectedNotificationActionData } from './FanRemixContestWinnersSelectedNotificationActionData'; +import { + FanRemixContestWinnersSelectedNotificationActionDataFromJSON, + FanRemixContestWinnersSelectedNotificationActionDataFromJSONTyped, + FanRemixContestWinnersSelectedNotificationActionDataToJSON, +} from './FanRemixContestWinnersSelectedNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestWinnersSelectedNotificationAction + */ +export interface FanRemixContestWinnersSelectedNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestWinnersSelectedNotificationActionData} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + data: FanRemixContestWinnersSelectedNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestWinnersSelectedNotificationAction interface. + */ +export function instanceOfFanRemixContestWinnersSelectedNotificationAction(value: object): value is FanRemixContestWinnersSelectedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestWinnersSelectedNotificationActionFromJSON(json: any): FanRemixContestWinnersSelectedNotificationAction { + return FanRemixContestWinnersSelectedNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestWinnersSelectedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestWinnersSelectedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestWinnersSelectedNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestWinnersSelectedNotificationActionToJSON(value?: FanRemixContestWinnersSelectedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestWinnersSelectedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationActionData.ts new file mode 100644 index 00000000000..59482d18415 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestWinnersSelectedNotificationActionData + */ +export interface FanRemixContestWinnersSelectedNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestWinnersSelectedNotificationActionData interface. + */ +export function instanceOfFanRemixContestWinnersSelectedNotificationActionData(value: object): value is FanRemixContestWinnersSelectedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestWinnersSelectedNotificationActionDataFromJSON(json: any): FanRemixContestWinnersSelectedNotificationActionData { + return FanRemixContestWinnersSelectedNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestWinnersSelectedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestWinnersSelectedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestWinnersSelectedNotificationActionDataToJSON(value?: FanRemixContestWinnersSelectedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts b/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts new file mode 100644 index 00000000000..52cab2f27d0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FieldVisibility + */ +export interface FieldVisibility { + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + mood: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + tags: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + genre: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + share: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + playCount: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + remixes: boolean; +} + +/** + * Check if a given object implements the FieldVisibility interface. + */ +export function instanceOfFieldVisibility(value: object): value is FieldVisibility { + let isInstance = true; + isInstance = isInstance && "mood" in value && value["mood"] !== undefined; + isInstance = isInstance && "tags" in value && value["tags"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "share" in value && value["share"] !== undefined; + isInstance = isInstance && "playCount" in value && value["playCount"] !== undefined; + isInstance = isInstance && "remixes" in value && value["remixes"] !== undefined; + + return isInstance; +} + +export function FieldVisibilityFromJSON(json: any): FieldVisibility { + return FieldVisibilityFromJSONTyped(json, false); +} + +export function FieldVisibilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): FieldVisibility { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'mood': json['mood'], + 'tags': json['tags'], + 'genre': json['genre'], + 'share': json['share'], + 'playCount': json['play_count'], + 'remixes': json['remixes'], + }; +} + +export function FieldVisibilityToJSON(value?: FieldVisibility | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'mood': value.mood, + 'tags': value.tags, + 'genre': value.genre, + 'share': value.share, + 'play_count': value.playCount, + 'remixes': value.remixes, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FollowNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowNotification.ts new file mode 100644 index 00000000000..4537dba204b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FollowNotificationAction } from './FollowNotificationAction'; +import { + FollowNotificationActionFromJSON, + FollowNotificationActionFromJSONTyped, + FollowNotificationActionToJSON, +} from './FollowNotificationAction'; + +/** + * + * @export + * @interface FollowNotification + */ +export interface FollowNotification { + /** + * + * @type {string} + * @memberof FollowNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FollowNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FollowNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FollowNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FollowNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FollowNotification interface. + */ +export function instanceOfFollowNotification(value: object): value is FollowNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FollowNotificationFromJSON(json: any): FollowNotification { + return FollowNotificationFromJSONTyped(json, false); +} + +export function FollowNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FollowNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FollowNotificationActionFromJSON)), + }; +} + +export function FollowNotificationToJSON(value?: FollowNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FollowNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationAction.ts new file mode 100644 index 00000000000..df313257d12 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FollowNotificationActionData } from './FollowNotificationActionData'; +import { + FollowNotificationActionDataFromJSON, + FollowNotificationActionDataFromJSONTyped, + FollowNotificationActionDataToJSON, +} from './FollowNotificationActionData'; + +/** + * + * @export + * @interface FollowNotificationAction + */ +export interface FollowNotificationAction { + /** + * + * @type {string} + * @memberof FollowNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FollowNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FollowNotificationAction + */ + timestamp: number; + /** + * + * @type {FollowNotificationActionData} + * @memberof FollowNotificationAction + */ + data: FollowNotificationActionData; +} + +/** + * Check if a given object implements the FollowNotificationAction interface. + */ +export function instanceOfFollowNotificationAction(value: object): value is FollowNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FollowNotificationActionFromJSON(json: any): FollowNotificationAction { + return FollowNotificationActionFromJSONTyped(json, false); +} + +export function FollowNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FollowNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FollowNotificationActionDataFromJSON(json['data']), + }; +} + +export function FollowNotificationActionToJSON(value?: FollowNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FollowNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationActionData.ts new file mode 100644 index 00000000000..7a64349144c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FollowNotificationActionData + */ +export interface FollowNotificationActionData { + /** + * + * @type {string} + * @memberof FollowNotificationActionData + */ + followerUserId: string; + /** + * + * @type {string} + * @memberof FollowNotificationActionData + */ + followeeUserId: string; +} + +/** + * Check if a given object implements the FollowNotificationActionData interface. + */ +export function instanceOfFollowNotificationActionData(value: object): value is FollowNotificationActionData { + let isInstance = true; + isInstance = isInstance && "followerUserId" in value && value["followerUserId"] !== undefined; + isInstance = isInstance && "followeeUserId" in value && value["followeeUserId"] !== undefined; + + return isInstance; +} + +export function FollowNotificationActionDataFromJSON(json: any): FollowNotificationActionData { + return FollowNotificationActionDataFromJSONTyped(json, false); +} + +export function FollowNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FollowNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'followerUserId': json['follower_user_id'], + 'followeeUserId': json['followee_user_id'], + }; +} + +export function FollowNotificationActionDataToJSON(value?: FollowNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'follower_user_id': value.followerUserId, + 'followee_user_id': value.followeeUserId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullBulkSubscribersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullBulkSubscribersResponse.ts new file mode 100644 index 00000000000..07ea3369fec --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullBulkSubscribersResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserSubscribers } from './UserSubscribers'; +import { + UserSubscribersFromJSON, + UserSubscribersFromJSONTyped, + UserSubscribersToJSON, +} from './UserSubscribers'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullBulkSubscribersResponse + */ +export interface FullBulkSubscribersResponse { + /** + * + * @type {number} + * @memberof FullBulkSubscribersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullBulkSubscribersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullBulkSubscribersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullBulkSubscribersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullBulkSubscribersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullBulkSubscribersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullBulkSubscribersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullBulkSubscribersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullBulkSubscribersResponse interface. + */ +export function instanceOfFullBulkSubscribersResponse(value: object): value is FullBulkSubscribersResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullBulkSubscribersResponseFromJSON(json: any): FullBulkSubscribersResponse { + return FullBulkSubscribersResponseFromJSONTyped(json, false); +} + +export function FullBulkSubscribersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullBulkSubscribersResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(UserSubscribersFromJSON)), + }; +} + +export function FullBulkSubscribersResponseToJSON(value?: FullBulkSubscribersResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(UserSubscribersToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporter.ts b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporter.ts new file mode 100644 index 00000000000..da43d8afa59 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporter.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FullSupporter } from './FullSupporter'; +import { + FullSupporterFromJSON, + FullSupporterFromJSONTyped, + FullSupporterToJSON, +} from './FullSupporter'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullGetSupporter + */ +export interface FullGetSupporter { + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullGetSupporter + */ + signature: string; + /** + * + * @type {string} + * @memberof FullGetSupporter + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullGetSupporter + */ + version: VersionMetadata; + /** + * + * @type {FullSupporter} + * @memberof FullGetSupporter + */ + data?: FullSupporter; +} + +/** + * Check if a given object implements the FullGetSupporter interface. + */ +export function instanceOfFullGetSupporter(value: object): value is FullGetSupporter { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullGetSupporterFromJSON(json: any): FullGetSupporter { + return FullGetSupporterFromJSONTyped(json, false); +} + +export function FullGetSupporterFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullGetSupporter { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : FullSupporterFromJSON(json['data']), + }; +} + +export function FullGetSupporterToJSON(value?: FullGetSupporter | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': FullSupporterToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporting.ts b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporting.ts new file mode 100644 index 00000000000..edf544c5d8d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporting.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FullSupporting } from './FullSupporting'; +import { + FullSupportingFromJSON, + FullSupportingFromJSONTyped, + FullSupportingToJSON, +} from './FullSupporting'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullGetSupporting + */ +export interface FullGetSupporting { + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullGetSupporting + */ + signature: string; + /** + * + * @type {string} + * @memberof FullGetSupporting + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullGetSupporting + */ + version: VersionMetadata; + /** + * + * @type {FullSupporting} + * @memberof FullGetSupporting + */ + data?: FullSupporting; +} + +/** + * Check if a given object implements the FullGetSupporting interface. + */ +export function instanceOfFullGetSupporting(value: object): value is FullGetSupporting { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullGetSupportingFromJSON(json: any): FullGetSupporting { + return FullGetSupportingFromJSONTyped(json, false); +} + +export function FullGetSupportingFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullGetSupporting { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : FullSupportingFromJSON(json['data']), + }; +} + +export function FullGetSupportingToJSON(value?: FullGetSupporting | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': FullSupportingToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullRemix.ts b/packages/sdk/src/sdk/api/generated/default/models/FullRemix.ts new file mode 100644 index 00000000000..a0290461e67 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullRemix.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface FullRemix + */ +export interface FullRemix { + /** + * + * @type {string} + * @memberof FullRemix + */ + parentTrackId: string; + /** + * + * @type {UserFull} + * @memberof FullRemix + */ + user: UserFull; + /** + * + * @type {boolean} + * @memberof FullRemix + */ + hasRemixAuthorReposted: boolean; + /** + * + * @type {boolean} + * @memberof FullRemix + */ + hasRemixAuthorSaved: boolean; +} + +/** + * Check if a given object implements the FullRemix interface. + */ +export function instanceOfFullRemix(value: object): value is FullRemix { + let isInstance = true; + isInstance = isInstance && "parentTrackId" in value && value["parentTrackId"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "hasRemixAuthorReposted" in value && value["hasRemixAuthorReposted"] !== undefined; + isInstance = isInstance && "hasRemixAuthorSaved" in value && value["hasRemixAuthorSaved"] !== undefined; + + return isInstance; +} + +export function FullRemixFromJSON(json: any): FullRemix { + return FullRemixFromJSONTyped(json, false); +} + +export function FullRemixFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullRemix { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'parentTrackId': json['parent_track_id'], + 'user': UserFullFromJSON(json['user']), + 'hasRemixAuthorReposted': json['has_remix_author_reposted'], + 'hasRemixAuthorSaved': json['has_remix_author_saved'], + }; +} + +export function FullRemixToJSON(value?: FullRemix | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'parent_track_id': value.parentTrackId, + 'user': UserFullToJSON(value.user), + 'has_remix_author_reposted': value.hasRemixAuthorReposted, + 'has_remix_author_saved': value.hasRemixAuthorSaved, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullRemixParent.ts b/packages/sdk/src/sdk/api/generated/default/models/FullRemixParent.ts new file mode 100644 index 00000000000..a3f08a07cc8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullRemixParent.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FullRemix } from './FullRemix'; +import { + FullRemixFromJSON, + FullRemixFromJSONTyped, + FullRemixToJSON, +} from './FullRemix'; + +/** + * + * @export + * @interface FullRemixParent + */ +export interface FullRemixParent { + /** + * + * @type {Array} + * @memberof FullRemixParent + */ + tracks?: Array; +} + +/** + * Check if a given object implements the FullRemixParent interface. + */ +export function instanceOfFullRemixParent(value: object): value is FullRemixParent { + let isInstance = true; + + return isInstance; +} + +export function FullRemixParentFromJSON(json: any): FullRemixParent { + return FullRemixParentFromJSONTyped(json, false); +} + +export function FullRemixParentFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullRemixParent { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(FullRemixFromJSON)), + }; +} + +export function FullRemixParentToJSON(value?: FullRemixParent | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(FullRemixToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullReposts.ts b/packages/sdk/src/sdk/api/generated/default/models/FullReposts.ts new file mode 100644 index 00000000000..f4d2cb469ef --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullReposts.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ActivityFull } from './ActivityFull'; +import { + ActivityFullFromJSON, + ActivityFullFromJSONTyped, + ActivityFullToJSON, +} from './ActivityFull'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullReposts + */ +export interface FullReposts { + /** + * + * @type {number} + * @memberof FullReposts + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullReposts + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullReposts + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullReposts + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullReposts + */ + signature: string; + /** + * + * @type {string} + * @memberof FullReposts + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullReposts + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullReposts + */ + data?: Array; +} + +/** + * Check if a given object implements the FullReposts interface. + */ +export function instanceOfFullReposts(value: object): value is FullReposts { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullRepostsFromJSON(json: any): FullReposts { + return FullRepostsFromJSONTyped(json, false); +} + +export function FullRepostsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullReposts { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(ActivityFullFromJSON)), + }; +} + +export function FullRepostsToJSON(value?: FullReposts | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(ActivityFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullSupporter.ts b/packages/sdk/src/sdk/api/generated/default/models/FullSupporter.ts new file mode 100644 index 00000000000..b5ce95d2345 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullSupporter.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface FullSupporter + */ +export interface FullSupporter { + /** + * + * @type {number} + * @memberof FullSupporter + */ + rank: number; + /** + * + * @type {string} + * @memberof FullSupporter + */ + amount: string; + /** + * + * @type {UserFull} + * @memberof FullSupporter + */ + sender: UserFull; +} + +/** + * Check if a given object implements the FullSupporter interface. + */ +export function instanceOfFullSupporter(value: object): value is FullSupporter { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "sender" in value && value["sender"] !== undefined; + + return isInstance; +} + +export function FullSupporterFromJSON(json: any): FullSupporter { + return FullSupporterFromJSONTyped(json, false); +} + +export function FullSupporterFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullSupporter { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'amount': json['amount'], + 'sender': UserFullFromJSON(json['sender']), + }; +} + +export function FullSupporterToJSON(value?: FullSupporter | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'amount': value.amount, + 'sender': UserFullToJSON(value.sender), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullSupporting.ts b/packages/sdk/src/sdk/api/generated/default/models/FullSupporting.ts new file mode 100644 index 00000000000..81f052375d8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullSupporting.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface FullSupporting + */ +export interface FullSupporting { + /** + * + * @type {number} + * @memberof FullSupporting + */ + rank: number; + /** + * + * @type {string} + * @memberof FullSupporting + */ + amount: string; + /** + * + * @type {UserFull} + * @memberof FullSupporting + */ + receiver: UserFull; +} + +/** + * Check if a given object implements the FullSupporting interface. + */ +export function instanceOfFullSupporting(value: object): value is FullSupporting { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "receiver" in value && value["receiver"] !== undefined; + + return isInstance; +} + +export function FullSupportingFromJSON(json: any): FullSupporting { + return FullSupportingFromJSONTyped(json, false); +} + +export function FullSupportingFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullSupporting { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'amount': json['amount'], + 'receiver': UserFullFromJSON(json['receiver']), + }; +} + +export function FullSupportingToJSON(value?: FullSupporting | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'amount': value.amount, + 'receiver': UserFullToJSON(value.receiver), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullTracksResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullTracksResponse.ts new file mode 100644 index 00000000000..84285140bf3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullTracksResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackFull } from './TrackFull'; +import { + TrackFullFromJSON, + TrackFullFromJSONTyped, + TrackFullToJSON, +} from './TrackFull'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullTracksResponse + */ +export interface FullTracksResponse { + /** + * + * @type {number} + * @memberof FullTracksResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullTracksResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullTracksResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullTracksResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullTracksResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullTracksResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullTracksResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullTracksResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullTracksResponse interface. + */ +export function instanceOfFullTracksResponse(value: object): value is FullTracksResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullTracksResponseFromJSON(json: any): FullTracksResponse { + return FullTracksResponseFromJSONTyped(json, false); +} + +export function FullTracksResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullTracksResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(TrackFullFromJSON)), + }; +} + +export function FullTracksResponseToJSON(value?: FullTracksResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(TrackFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullTrendingPlaylistsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullTrendingPlaylistsResponse.ts new file mode 100644 index 00000000000..2639b161a22 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullTrendingPlaylistsResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PlaylistFull } from './PlaylistFull'; +import { + PlaylistFullFromJSON, + PlaylistFullFromJSONTyped, + PlaylistFullToJSON, +} from './PlaylistFull'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullTrendingPlaylistsResponse + */ +export interface FullTrendingPlaylistsResponse { + /** + * + * @type {number} + * @memberof FullTrendingPlaylistsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullTrendingPlaylistsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullTrendingPlaylistsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullTrendingPlaylistsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullTrendingPlaylistsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullTrendingPlaylistsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullTrendingPlaylistsResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullTrendingPlaylistsResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullTrendingPlaylistsResponse interface. + */ +export function instanceOfFullTrendingPlaylistsResponse(value: object): value is FullTrendingPlaylistsResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullTrendingPlaylistsResponseFromJSON(json: any): FullTrendingPlaylistsResponse { + return FullTrendingPlaylistsResponseFromJSONTyped(json, false); +} + +export function FullTrendingPlaylistsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullTrendingPlaylistsResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(PlaylistFullFromJSON)), + }; +} + +export function FullTrendingPlaylistsResponseToJSON(value?: FullTrendingPlaylistsResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(PlaylistFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Grant.ts b/packages/sdk/src/sdk/api/generated/default/models/Grant.ts new file mode 100644 index 00000000000..97b7273bf05 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Grant.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface Grant + */ +export interface Grant { + /** + * + * @type {string} + * @memberof Grant + */ + granteeAddress: string; + /** + * + * @type {string} + * @memberof Grant + */ + userId: string; + /** + * + * @type {boolean} + * @memberof Grant + */ + isRevoked: boolean; + /** + * + * @type {boolean} + * @memberof Grant + */ + isApproved: boolean; + /** + * + * @type {string} + * @memberof Grant + */ + createdAt: string; + /** + * + * @type {string} + * @memberof Grant + */ + updatedAt: string; +} + +/** + * Check if a given object implements the Grant interface. + */ +export function instanceOfGrant(value: object): value is Grant { + let isInstance = true; + isInstance = isInstance && "granteeAddress" in value && value["granteeAddress"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isRevoked" in value && value["isRevoked"] !== undefined; + isInstance = isInstance && "isApproved" in value && value["isApproved"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + + return isInstance; +} + +export function GrantFromJSON(json: any): Grant { + return GrantFromJSONTyped(json, false); +} + +export function GrantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Grant { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'granteeAddress': json['grantee_address'], + 'userId': json['user_id'], + 'isRevoked': json['is_revoked'], + 'isApproved': json['is_approved'], + 'createdAt': json['created_at'], + 'updatedAt': json['updated_at'], + }; +} + +export function GrantToJSON(value?: Grant | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'grantee_address': value.granteeAddress, + 'user_id': value.userId, + 'is_revoked': value.isRevoked, + 'is_approved': value.isApproved, + 'created_at': value.createdAt, + 'updated_at': value.updatedAt, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotification.ts new file mode 100644 index 00000000000..bf91fd40a6a --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ListenStreakReminderNotificationAction } from './ListenStreakReminderNotificationAction'; +import { + ListenStreakReminderNotificationActionFromJSON, + ListenStreakReminderNotificationActionFromJSONTyped, + ListenStreakReminderNotificationActionToJSON, +} from './ListenStreakReminderNotificationAction'; + +/** + * + * @export + * @interface ListenStreakReminderNotification + */ +export interface ListenStreakReminderNotification { + /** + * + * @type {string} + * @memberof ListenStreakReminderNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ListenStreakReminderNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ListenStreakReminderNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ListenStreakReminderNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ListenStreakReminderNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ListenStreakReminderNotification interface. + */ +export function instanceOfListenStreakReminderNotification(value: object): value is ListenStreakReminderNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ListenStreakReminderNotificationFromJSON(json: any): ListenStreakReminderNotification { + return ListenStreakReminderNotificationFromJSONTyped(json, false); +} + +export function ListenStreakReminderNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListenStreakReminderNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ListenStreakReminderNotificationActionFromJSON)), + }; +} + +export function ListenStreakReminderNotificationToJSON(value?: ListenStreakReminderNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ListenStreakReminderNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationAction.ts new file mode 100644 index 00000000000..b43b29296ff --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ListenStreakReminderNotificationActionData } from './ListenStreakReminderNotificationActionData'; +import { + ListenStreakReminderNotificationActionDataFromJSON, + ListenStreakReminderNotificationActionDataFromJSONTyped, + ListenStreakReminderNotificationActionDataToJSON, +} from './ListenStreakReminderNotificationActionData'; + +/** + * + * @export + * @interface ListenStreakReminderNotificationAction + */ +export interface ListenStreakReminderNotificationAction { + /** + * + * @type {string} + * @memberof ListenStreakReminderNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ListenStreakReminderNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ListenStreakReminderNotificationAction + */ + timestamp: number; + /** + * + * @type {ListenStreakReminderNotificationActionData} + * @memberof ListenStreakReminderNotificationAction + */ + data: ListenStreakReminderNotificationActionData; +} + +/** + * Check if a given object implements the ListenStreakReminderNotificationAction interface. + */ +export function instanceOfListenStreakReminderNotificationAction(value: object): value is ListenStreakReminderNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ListenStreakReminderNotificationActionFromJSON(json: any): ListenStreakReminderNotificationAction { + return ListenStreakReminderNotificationActionFromJSONTyped(json, false); +} + +export function ListenStreakReminderNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListenStreakReminderNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ListenStreakReminderNotificationActionDataFromJSON(json['data']), + }; +} + +export function ListenStreakReminderNotificationActionToJSON(value?: ListenStreakReminderNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ListenStreakReminderNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationActionData.ts new file mode 100644 index 00000000000..47b9c0e697d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ListenStreakReminderNotificationActionData.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ListenStreakReminderNotificationActionData + */ +export interface ListenStreakReminderNotificationActionData { + /** + * + * @type {number} + * @memberof ListenStreakReminderNotificationActionData + */ + streak: number; +} + +/** + * Check if a given object implements the ListenStreakReminderNotificationActionData interface. + */ +export function instanceOfListenStreakReminderNotificationActionData(value: object): value is ListenStreakReminderNotificationActionData { + let isInstance = true; + isInstance = isInstance && "streak" in value && value["streak"] !== undefined; + + return isInstance; +} + +export function ListenStreakReminderNotificationActionDataFromJSON(json: any): ListenStreakReminderNotificationActionData { + return ListenStreakReminderNotificationActionDataFromJSONTyped(json, false); +} + +export function ListenStreakReminderNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListenStreakReminderNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'streak': json['streak'], + }; +} + +export function ListenStreakReminderNotificationActionDataToJSON(value?: ListenStreakReminderNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'streak': value.streak, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ManagedUser.ts b/packages/sdk/src/sdk/api/generated/default/models/ManagedUser.ts new file mode 100644 index 00000000000..d16d1196e95 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ManagedUser.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Grant } from './Grant'; +import { + GrantFromJSON, + GrantFromJSONTyped, + GrantToJSON, +} from './Grant'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface ManagedUser + */ +export interface ManagedUser { + /** + * + * @type {UserFull} + * @memberof ManagedUser + */ + user: UserFull; + /** + * + * @type {Grant} + * @memberof ManagedUser + */ + grant: Grant; +} + +/** + * Check if a given object implements the ManagedUser interface. + */ +export function instanceOfManagedUser(value: object): value is ManagedUser { + let isInstance = true; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "grant" in value && value["grant"] !== undefined; + + return isInstance; +} + +export function ManagedUserFromJSON(json: any): ManagedUser { + return ManagedUserFromJSONTyped(json, false); +} + +export function ManagedUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedUser { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'user': UserFullFromJSON(json['user']), + 'grant': GrantFromJSON(json['grant']), + }; +} + +export function ManagedUserToJSON(value?: ManagedUser | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user': UserFullToJSON(value.user), + 'grant': GrantToJSON(value.grant), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ManagedUsersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/ManagedUsersResponse.ts new file mode 100644 index 00000000000..9fa1ea70b64 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ManagedUsersResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ManagedUser } from './ManagedUser'; +import { + ManagedUserFromJSON, + ManagedUserFromJSONTyped, + ManagedUserToJSON, +} from './ManagedUser'; + +/** + * + * @export + * @interface ManagedUsersResponse + */ +export interface ManagedUsersResponse { + /** + * + * @type {Array} + * @memberof ManagedUsersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the ManagedUsersResponse interface. + */ +export function instanceOfManagedUsersResponse(value: object): value is ManagedUsersResponse { + let isInstance = true; + + return isInstance; +} + +export function ManagedUsersResponseFromJSON(json: any): ManagedUsersResponse { + return ManagedUsersResponseFromJSONTyped(json, false); +} + +export function ManagedUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedUsersResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(ManagedUserFromJSON)), + }; +} + +export function ManagedUsersResponseToJSON(value?: ManagedUsersResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': value.data === undefined ? undefined : ((value.data as Array).map(ManagedUserToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ManagersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/ManagersResponse.ts new file mode 100644 index 00000000000..1f4f8ad97c6 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ManagersResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserManager } from './UserManager'; +import { + UserManagerFromJSON, + UserManagerFromJSONTyped, + UserManagerToJSON, +} from './UserManager'; + +/** + * + * @export + * @interface ManagersResponse + */ +export interface ManagersResponse { + /** + * + * @type {Array} + * @memberof ManagersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the ManagersResponse interface. + */ +export function instanceOfManagersResponse(value: object): value is ManagersResponse { + let isInstance = true; + + return isInstance; +} + +export function ManagersResponseFromJSON(json: any): ManagersResponse { + return ManagersResponseFromJSONTyped(json, false); +} + +export function ManagersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagersResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(UserManagerFromJSON)), + }; +} + +export function ManagersResponseToJSON(value?: ManagersResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': value.data === undefined ? undefined : ((value.data as Array).map(UserManagerToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotification.ts new file mode 100644 index 00000000000..33acd71b230 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { MilestoneNotificationAction } from './MilestoneNotificationAction'; +import { + MilestoneNotificationActionFromJSON, + MilestoneNotificationActionFromJSONTyped, + MilestoneNotificationActionToJSON, +} from './MilestoneNotificationAction'; + +/** + * + * @export + * @interface MilestoneNotification + */ +export interface MilestoneNotification { + /** + * + * @type {string} + * @memberof MilestoneNotification + */ + type: string; + /** + * + * @type {string} + * @memberof MilestoneNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof MilestoneNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof MilestoneNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof MilestoneNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the MilestoneNotification interface. + */ +export function instanceOfMilestoneNotification(value: object): value is MilestoneNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function MilestoneNotificationFromJSON(json: any): MilestoneNotification { + return MilestoneNotificationFromJSONTyped(json, false); +} + +export function MilestoneNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): MilestoneNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(MilestoneNotificationActionFromJSON)), + }; +} + +export function MilestoneNotificationToJSON(value?: MilestoneNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(MilestoneNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationAction.ts new file mode 100644 index 00000000000..3d91ddf7cd8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { MilestoneNotificationActionData } from './MilestoneNotificationActionData'; +import { + MilestoneNotificationActionDataFromJSON, + MilestoneNotificationActionDataFromJSONTyped, + MilestoneNotificationActionDataToJSON, +} from './MilestoneNotificationActionData'; + +/** + * + * @export + * @interface MilestoneNotificationAction + */ +export interface MilestoneNotificationAction { + /** + * + * @type {string} + * @memberof MilestoneNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof MilestoneNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof MilestoneNotificationAction + */ + timestamp: number; + /** + * + * @type {MilestoneNotificationActionData} + * @memberof MilestoneNotificationAction + */ + data: MilestoneNotificationActionData; +} + +/** + * Check if a given object implements the MilestoneNotificationAction interface. + */ +export function instanceOfMilestoneNotificationAction(value: object): value is MilestoneNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function MilestoneNotificationActionFromJSON(json: any): MilestoneNotificationAction { + return MilestoneNotificationActionFromJSONTyped(json, false); +} + +export function MilestoneNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): MilestoneNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': MilestoneNotificationActionDataFromJSON(json['data']), + }; +} + +export function MilestoneNotificationActionToJSON(value?: MilestoneNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': MilestoneNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationActionData.ts new file mode 100644 index 00000000000..a3762838831 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/MilestoneNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { + PlaylistMilestoneNotificationActionData, + instanceOfPlaylistMilestoneNotificationActionData, + PlaylistMilestoneNotificationActionDataFromJSON, + PlaylistMilestoneNotificationActionDataFromJSONTyped, + PlaylistMilestoneNotificationActionDataToJSON, +} from './PlaylistMilestoneNotificationActionData'; +import { + TrackMilestoneNotificationActionData, + instanceOfTrackMilestoneNotificationActionData, + TrackMilestoneNotificationActionDataFromJSON, + TrackMilestoneNotificationActionDataFromJSONTyped, + TrackMilestoneNotificationActionDataToJSON, +} from './TrackMilestoneNotificationActionData'; +import { + UserMilestoneNotificationActionData, + instanceOfUserMilestoneNotificationActionData, + UserMilestoneNotificationActionDataFromJSON, + UserMilestoneNotificationActionDataFromJSONTyped, + UserMilestoneNotificationActionDataToJSON, +} from './UserMilestoneNotificationActionData'; + +/** + * @type MilestoneNotificationActionData + * + * @export + */ +export type MilestoneNotificationActionData = PlaylistMilestoneNotificationActionData | TrackMilestoneNotificationActionData | UserMilestoneNotificationActionData; + +export function MilestoneNotificationActionDataFromJSON(json: any): MilestoneNotificationActionData { + return MilestoneNotificationActionDataFromJSONTyped(json, false); +} + +export function MilestoneNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): MilestoneNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { ...PlaylistMilestoneNotificationActionDataFromJSONTyped(json, true), ...TrackMilestoneNotificationActionDataFromJSONTyped(json, true), ...UserMilestoneNotificationActionDataFromJSONTyped(json, true) }; +} + +export function MilestoneNotificationActionDataToJSON(value?: MilestoneNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + + if (instanceOfPlaylistMilestoneNotificationActionData(value)) { + return PlaylistMilestoneNotificationActionDataToJSON(value as PlaylistMilestoneNotificationActionData); + } + if (instanceOfTrackMilestoneNotificationActionData(value)) { + return TrackMilestoneNotificationActionDataToJSON(value as TrackMilestoneNotificationActionData); + } + if (instanceOfUserMilestoneNotificationActionData(value)) { + return UserMilestoneNotificationActionDataToJSON(value as UserMilestoneNotificationActionData); + } + + return {}; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Notification.ts b/packages/sdk/src/sdk/api/generated/default/models/Notification.ts new file mode 100644 index 00000000000..03fac83b6e1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Notification.ts @@ -0,0 +1,495 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { + AnnouncementNotification, + instanceOfAnnouncementNotification, + AnnouncementNotificationFromJSON, + AnnouncementNotificationFromJSONTyped, + AnnouncementNotificationToJSON, +} from './AnnouncementNotification'; +import { + ApproveManagerRequestNotification, + instanceOfApproveManagerRequestNotification, + ApproveManagerRequestNotificationFromJSON, + ApproveManagerRequestNotificationFromJSONTyped, + ApproveManagerRequestNotificationToJSON, +} from './ApproveManagerRequestNotification'; +import { + ArtistRemixContestEndedNotification, + instanceOfArtistRemixContestEndedNotification, + ArtistRemixContestEndedNotificationFromJSON, + ArtistRemixContestEndedNotificationFromJSONTyped, + ArtistRemixContestEndedNotificationToJSON, +} from './ArtistRemixContestEndedNotification'; +import { + ArtistRemixContestEndingSoonNotification, + instanceOfArtistRemixContestEndingSoonNotification, + ArtistRemixContestEndingSoonNotificationFromJSON, + ArtistRemixContestEndingSoonNotificationFromJSONTyped, + ArtistRemixContestEndingSoonNotificationToJSON, +} from './ArtistRemixContestEndingSoonNotification'; +import { + ArtistRemixContestSubmissionsNotification, + instanceOfArtistRemixContestSubmissionsNotification, + ArtistRemixContestSubmissionsNotificationFromJSON, + ArtistRemixContestSubmissionsNotificationFromJSONTyped, + ArtistRemixContestSubmissionsNotificationToJSON, +} from './ArtistRemixContestSubmissionsNotification'; +import { + ChallengeRewardNotification, + instanceOfChallengeRewardNotification, + ChallengeRewardNotificationFromJSON, + ChallengeRewardNotificationFromJSONTyped, + ChallengeRewardNotificationToJSON, +} from './ChallengeRewardNotification'; +import { + ClaimableRewardNotification, + instanceOfClaimableRewardNotification, + ClaimableRewardNotificationFromJSON, + ClaimableRewardNotificationFromJSONTyped, + ClaimableRewardNotificationToJSON, +} from './ClaimableRewardNotification'; +import { + CommentMentionNotification, + instanceOfCommentMentionNotification, + CommentMentionNotificationFromJSON, + CommentMentionNotificationFromJSONTyped, + CommentMentionNotificationToJSON, +} from './CommentMentionNotification'; +import { + CommentNotification, + instanceOfCommentNotification, + CommentNotificationFromJSON, + CommentNotificationFromJSONTyped, + CommentNotificationToJSON, +} from './CommentNotification'; +import { + CommentReactionNotification, + instanceOfCommentReactionNotification, + CommentReactionNotificationFromJSON, + CommentReactionNotificationFromJSONTyped, + CommentReactionNotificationToJSON, +} from './CommentReactionNotification'; +import { + CommentThreadNotification, + instanceOfCommentThreadNotification, + CommentThreadNotificationFromJSON, + CommentThreadNotificationFromJSONTyped, + CommentThreadNotificationToJSON, +} from './CommentThreadNotification'; +import { + CosignNotification, + instanceOfCosignNotification, + CosignNotificationFromJSON, + CosignNotificationFromJSONTyped, + CosignNotificationToJSON, +} from './CosignNotification'; +import { + CreateNotification, + instanceOfCreateNotification, + CreateNotificationFromJSON, + CreateNotificationFromJSONTyped, + CreateNotificationToJSON, +} from './CreateNotification'; +import { + FanRemixContestEndedNotification, + instanceOfFanRemixContestEndedNotification, + FanRemixContestEndedNotificationFromJSON, + FanRemixContestEndedNotificationFromJSONTyped, + FanRemixContestEndedNotificationToJSON, +} from './FanRemixContestEndedNotification'; +import { + FanRemixContestEndingSoonNotification, + instanceOfFanRemixContestEndingSoonNotification, + FanRemixContestEndingSoonNotificationFromJSON, + FanRemixContestEndingSoonNotificationFromJSONTyped, + FanRemixContestEndingSoonNotificationToJSON, +} from './FanRemixContestEndingSoonNotification'; +import { + FanRemixContestStartedNotification, + instanceOfFanRemixContestStartedNotification, + FanRemixContestStartedNotificationFromJSON, + FanRemixContestStartedNotificationFromJSONTyped, + FanRemixContestStartedNotificationToJSON, +} from './FanRemixContestStartedNotification'; +import { + FanRemixContestWinnersSelectedNotification, + instanceOfFanRemixContestWinnersSelectedNotification, + FanRemixContestWinnersSelectedNotificationFromJSON, + FanRemixContestWinnersSelectedNotificationFromJSONTyped, + FanRemixContestWinnersSelectedNotificationToJSON, +} from './FanRemixContestWinnersSelectedNotification'; +import { + FollowNotification, + instanceOfFollowNotification, + FollowNotificationFromJSON, + FollowNotificationFromJSONTyped, + FollowNotificationToJSON, +} from './FollowNotification'; +import { + ListenStreakReminderNotification, + instanceOfListenStreakReminderNotification, + ListenStreakReminderNotificationFromJSON, + ListenStreakReminderNotificationFromJSONTyped, + ListenStreakReminderNotificationToJSON, +} from './ListenStreakReminderNotification'; +import { + MilestoneNotification, + instanceOfMilestoneNotification, + MilestoneNotificationFromJSON, + MilestoneNotificationFromJSONTyped, + MilestoneNotificationToJSON, +} from './MilestoneNotification'; +import { + ReactionNotification, + instanceOfReactionNotification, + ReactionNotificationFromJSON, + ReactionNotificationFromJSONTyped, + ReactionNotificationToJSON, +} from './ReactionNotification'; +import { + ReceiveTipNotification, + instanceOfReceiveTipNotification, + ReceiveTipNotificationFromJSON, + ReceiveTipNotificationFromJSONTyped, + ReceiveTipNotificationToJSON, +} from './ReceiveTipNotification'; +import { + RemixNotification, + instanceOfRemixNotification, + RemixNotificationFromJSON, + RemixNotificationFromJSONTyped, + RemixNotificationToJSON, +} from './RemixNotification'; +import { + RepostNotification, + instanceOfRepostNotification, + RepostNotificationFromJSON, + RepostNotificationFromJSONTyped, + RepostNotificationToJSON, +} from './RepostNotification'; +import { + RepostOfRepostNotification, + instanceOfRepostOfRepostNotification, + RepostOfRepostNotificationFromJSON, + RepostOfRepostNotificationFromJSONTyped, + RepostOfRepostNotificationToJSON, +} from './RepostOfRepostNotification'; +import { + RequestManagerNotification, + instanceOfRequestManagerNotification, + RequestManagerNotificationFromJSON, + RequestManagerNotificationFromJSONTyped, + RequestManagerNotificationToJSON, +} from './RequestManagerNotification'; +import { + SaveNotification, + instanceOfSaveNotification, + SaveNotificationFromJSON, + SaveNotificationFromJSONTyped, + SaveNotificationToJSON, +} from './SaveNotification'; +import { + SaveOfRepostNotification, + instanceOfSaveOfRepostNotification, + SaveOfRepostNotificationFromJSON, + SaveOfRepostNotificationFromJSONTyped, + SaveOfRepostNotificationToJSON, +} from './SaveOfRepostNotification'; +import { + SendTipNotification, + instanceOfSendTipNotification, + SendTipNotificationFromJSON, + SendTipNotificationFromJSONTyped, + SendTipNotificationToJSON, +} from './SendTipNotification'; +import { + SupporterDethronedNotification, + instanceOfSupporterDethronedNotification, + SupporterDethronedNotificationFromJSON, + SupporterDethronedNotificationFromJSONTyped, + SupporterDethronedNotificationToJSON, +} from './SupporterDethronedNotification'; +import { + SupporterRankUpNotification, + instanceOfSupporterRankUpNotification, + SupporterRankUpNotificationFromJSON, + SupporterRankUpNotificationFromJSONTyped, + SupporterRankUpNotificationToJSON, +} from './SupporterRankUpNotification'; +import { + TastemakerNotification, + instanceOfTastemakerNotification, + TastemakerNotificationFromJSON, + TastemakerNotificationFromJSONTyped, + TastemakerNotificationToJSON, +} from './TastemakerNotification'; +import { + TierChangeNotification, + instanceOfTierChangeNotification, + TierChangeNotificationFromJSON, + TierChangeNotificationFromJSONTyped, + TierChangeNotificationToJSON, +} from './TierChangeNotification'; +import { + TrackAddedToPlaylistNotification, + instanceOfTrackAddedToPlaylistNotification, + TrackAddedToPlaylistNotificationFromJSON, + TrackAddedToPlaylistNotificationFromJSONTyped, + TrackAddedToPlaylistNotificationToJSON, +} from './TrackAddedToPlaylistNotification'; +import { + TrackAddedToPurchasedAlbumNotification, + instanceOfTrackAddedToPurchasedAlbumNotification, + TrackAddedToPurchasedAlbumNotificationFromJSON, + TrackAddedToPurchasedAlbumNotificationFromJSONTyped, + TrackAddedToPurchasedAlbumNotificationToJSON, +} from './TrackAddedToPurchasedAlbumNotification'; +import { + TrendingNotification, + instanceOfTrendingNotification, + TrendingNotificationFromJSON, + TrendingNotificationFromJSONTyped, + TrendingNotificationToJSON, +} from './TrendingNotification'; +import { + TrendingPlaylistNotification, + instanceOfTrendingPlaylistNotification, + TrendingPlaylistNotificationFromJSON, + TrendingPlaylistNotificationFromJSONTyped, + TrendingPlaylistNotificationToJSON, +} from './TrendingPlaylistNotification'; +import { + TrendingUndergroundNotification, + instanceOfTrendingUndergroundNotification, + TrendingUndergroundNotificationFromJSON, + TrendingUndergroundNotificationFromJSONTyped, + TrendingUndergroundNotificationToJSON, +} from './TrendingUndergroundNotification'; +import { + UsdcPurchaseBuyerNotification, + instanceOfUsdcPurchaseBuyerNotification, + UsdcPurchaseBuyerNotificationFromJSON, + UsdcPurchaseBuyerNotificationFromJSONTyped, + UsdcPurchaseBuyerNotificationToJSON, +} from './UsdcPurchaseBuyerNotification'; +import { + UsdcPurchaseSellerNotification, + instanceOfUsdcPurchaseSellerNotification, + UsdcPurchaseSellerNotificationFromJSON, + UsdcPurchaseSellerNotificationFromJSONTyped, + UsdcPurchaseSellerNotificationToJSON, +} from './UsdcPurchaseSellerNotification'; + +/** + * @type Notification + * + * @export + */ +export type Notification = { type: 'announcement' } & AnnouncementNotification | { type: 'approve_manager_request' } & ApproveManagerRequestNotification | { type: 'artist_remix_contest_ended' } & ArtistRemixContestEndedNotification | { type: 'artist_remix_contest_ending_soon' } & ArtistRemixContestEndingSoonNotification | { type: 'artist_remix_contest_submissions' } & ArtistRemixContestSubmissionsNotification | { type: 'challenge_reward' } & ChallengeRewardNotification | { type: 'claimable_reward' } & ClaimableRewardNotification | { type: 'comment' } & CommentNotification | { type: 'comment_mention' } & CommentMentionNotification | { type: 'comment_reaction' } & CommentReactionNotification | { type: 'comment_thread' } & CommentThreadNotification | { type: 'cosign' } & CosignNotification | { type: 'create' } & CreateNotification | { type: 'fan_remix_contest_ended' } & FanRemixContestEndedNotification | { type: 'fan_remix_contest_ending_soon' } & FanRemixContestEndingSoonNotification | { type: 'fan_remix_contest_started' } & FanRemixContestStartedNotification | { type: 'fan_remix_contest_winners_selected' } & FanRemixContestWinnersSelectedNotification | { type: 'follow' } & FollowNotification | { type: 'listen_streak_reminder' } & ListenStreakReminderNotification | { type: 'milestone' } & MilestoneNotification | { type: 'reaction' } & ReactionNotification | { type: 'remix' } & RemixNotification | { type: 'repost' } & RepostNotification | { type: 'repost_of_repost' } & RepostOfRepostNotification | { type: 'request_manager' } & RequestManagerNotification | { type: 'save' } & SaveNotification | { type: 'save_of_repost' } & SaveOfRepostNotification | { type: 'supporter_dethroned' } & SupporterDethronedNotification | { type: 'supporter_rank_up' } & SupporterRankUpNotification | { type: 'supporting_rank_up' } & SupporterRankUpNotification | { type: 'tastemaker' } & TastemakerNotification | { type: 'tier_change' } & TierChangeNotification | { type: 'tip_receive' } & ReceiveTipNotification | { type: 'tip_send' } & SendTipNotification | { type: 'track_added_to_playlist' } & TrackAddedToPlaylistNotification | { type: 'track_added_to_purchased_album' } & TrackAddedToPurchasedAlbumNotification | { type: 'trending' } & TrendingNotification | { type: 'trending_playlist' } & TrendingPlaylistNotification | { type: 'trending_underground' } & TrendingUndergroundNotification | { type: 'usdc_purchase_buyer' } & UsdcPurchaseBuyerNotification | { type: 'usdc_purchase_seller' } & UsdcPurchaseSellerNotification; + +export function NotificationFromJSON(json: any): Notification { + return NotificationFromJSONTyped(json, false); +} + +export function NotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Notification { + if ((json === undefined) || (json === null)) { + return json; + } + switch (json['type']) { + case 'announcement': + return {...AnnouncementNotificationFromJSONTyped(json, true), type: 'announcement'}; + case 'approve_manager_request': + return {...ApproveManagerRequestNotificationFromJSONTyped(json, true), type: 'approve_manager_request'}; + case 'artist_remix_contest_ended': + return {...ArtistRemixContestEndedNotificationFromJSONTyped(json, true), type: 'artist_remix_contest_ended'}; + case 'artist_remix_contest_ending_soon': + return {...ArtistRemixContestEndingSoonNotificationFromJSONTyped(json, true), type: 'artist_remix_contest_ending_soon'}; + case 'artist_remix_contest_submissions': + return {...ArtistRemixContestSubmissionsNotificationFromJSONTyped(json, true), type: 'artist_remix_contest_submissions'}; + case 'challenge_reward': + return {...ChallengeRewardNotificationFromJSONTyped(json, true), type: 'challenge_reward'}; + case 'claimable_reward': + return {...ClaimableRewardNotificationFromJSONTyped(json, true), type: 'claimable_reward'}; + case 'comment': + return {...CommentNotificationFromJSONTyped(json, true), type: 'comment'}; + case 'comment_mention': + return {...CommentMentionNotificationFromJSONTyped(json, true), type: 'comment_mention'}; + case 'comment_reaction': + return {...CommentReactionNotificationFromJSONTyped(json, true), type: 'comment_reaction'}; + case 'comment_thread': + return {...CommentThreadNotificationFromJSONTyped(json, true), type: 'comment_thread'}; + case 'cosign': + return {...CosignNotificationFromJSONTyped(json, true), type: 'cosign'}; + case 'create': + return {...CreateNotificationFromJSONTyped(json, true), type: 'create'}; + case 'fan_remix_contest_ended': + return {...FanRemixContestEndedNotificationFromJSONTyped(json, true), type: 'fan_remix_contest_ended'}; + case 'fan_remix_contest_ending_soon': + return {...FanRemixContestEndingSoonNotificationFromJSONTyped(json, true), type: 'fan_remix_contest_ending_soon'}; + case 'fan_remix_contest_started': + return {...FanRemixContestStartedNotificationFromJSONTyped(json, true), type: 'fan_remix_contest_started'}; + case 'fan_remix_contest_winners_selected': + return {...FanRemixContestWinnersSelectedNotificationFromJSONTyped(json, true), type: 'fan_remix_contest_winners_selected'}; + case 'follow': + return {...FollowNotificationFromJSONTyped(json, true), type: 'follow'}; + case 'listen_streak_reminder': + return {...ListenStreakReminderNotificationFromJSONTyped(json, true), type: 'listen_streak_reminder'}; + case 'milestone': + return {...MilestoneNotificationFromJSONTyped(json, true), type: 'milestone'}; + case 'reaction': + return {...ReactionNotificationFromJSONTyped(json, true), type: 'reaction'}; + case 'remix': + return {...RemixNotificationFromJSONTyped(json, true), type: 'remix'}; + case 'repost': + return {...RepostNotificationFromJSONTyped(json, true), type: 'repost'}; + case 'repost_of_repost': + return {...RepostOfRepostNotificationFromJSONTyped(json, true), type: 'repost_of_repost'}; + case 'request_manager': + return {...RequestManagerNotificationFromJSONTyped(json, true), type: 'request_manager'}; + case 'save': + return {...SaveNotificationFromJSONTyped(json, true), type: 'save'}; + case 'save_of_repost': + return {...SaveOfRepostNotificationFromJSONTyped(json, true), type: 'save_of_repost'}; + case 'supporter_dethroned': + return {...SupporterDethronedNotificationFromJSONTyped(json, true), type: 'supporter_dethroned'}; + case 'supporter_rank_up': + return {...SupporterRankUpNotificationFromJSONTyped(json, true), type: 'supporter_rank_up'}; + case 'supporting_rank_up': + return {...SupporterRankUpNotificationFromJSONTyped(json, true), type: 'supporting_rank_up'}; + case 'tastemaker': + return {...TastemakerNotificationFromJSONTyped(json, true), type: 'tastemaker'}; + case 'tier_change': + return {...TierChangeNotificationFromJSONTyped(json, true), type: 'tier_change'}; + case 'tip_receive': + return {...ReceiveTipNotificationFromJSONTyped(json, true), type: 'tip_receive'}; + case 'tip_send': + return {...SendTipNotificationFromJSONTyped(json, true), type: 'tip_send'}; + case 'track_added_to_playlist': + return {...TrackAddedToPlaylistNotificationFromJSONTyped(json, true), type: 'track_added_to_playlist'}; + case 'track_added_to_purchased_album': + return {...TrackAddedToPurchasedAlbumNotificationFromJSONTyped(json, true), type: 'track_added_to_purchased_album'}; + case 'trending': + return {...TrendingNotificationFromJSONTyped(json, true), type: 'trending'}; + case 'trending_playlist': + return {...TrendingPlaylistNotificationFromJSONTyped(json, true), type: 'trending_playlist'}; + case 'trending_underground': + return {...TrendingUndergroundNotificationFromJSONTyped(json, true), type: 'trending_underground'}; + case 'usdc_purchase_buyer': + return {...UsdcPurchaseBuyerNotificationFromJSONTyped(json, true), type: 'usdc_purchase_buyer'}; + case 'usdc_purchase_seller': + return {...UsdcPurchaseSellerNotificationFromJSONTyped(json, true), type: 'usdc_purchase_seller'}; + default: + throw new Error(`No variant of Notification exists with 'type=${json['type']}'`); + } +} + +export function NotificationToJSON(value?: Notification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + switch (value['type']) { + case 'announcement': + return AnnouncementNotificationToJSON(value); + case 'approve_manager_request': + return ApproveManagerRequestNotificationToJSON(value); + case 'artist_remix_contest_ended': + return ArtistRemixContestEndedNotificationToJSON(value); + case 'artist_remix_contest_ending_soon': + return ArtistRemixContestEndingSoonNotificationToJSON(value); + case 'artist_remix_contest_submissions': + return ArtistRemixContestSubmissionsNotificationToJSON(value); + case 'challenge_reward': + return ChallengeRewardNotificationToJSON(value); + case 'claimable_reward': + return ClaimableRewardNotificationToJSON(value); + case 'comment': + return CommentNotificationToJSON(value); + case 'comment_mention': + return CommentMentionNotificationToJSON(value); + case 'comment_reaction': + return CommentReactionNotificationToJSON(value); + case 'comment_thread': + return CommentThreadNotificationToJSON(value); + case 'cosign': + return CosignNotificationToJSON(value); + case 'create': + return CreateNotificationToJSON(value); + case 'fan_remix_contest_ended': + return FanRemixContestEndedNotificationToJSON(value); + case 'fan_remix_contest_ending_soon': + return FanRemixContestEndingSoonNotificationToJSON(value); + case 'fan_remix_contest_started': + return FanRemixContestStartedNotificationToJSON(value); + case 'fan_remix_contest_winners_selected': + return FanRemixContestWinnersSelectedNotificationToJSON(value); + case 'follow': + return FollowNotificationToJSON(value); + case 'listen_streak_reminder': + return ListenStreakReminderNotificationToJSON(value); + case 'milestone': + return MilestoneNotificationToJSON(value); + case 'reaction': + return ReactionNotificationToJSON(value); + case 'remix': + return RemixNotificationToJSON(value); + case 'repost': + return RepostNotificationToJSON(value); + case 'repost_of_repost': + return RepostOfRepostNotificationToJSON(value); + case 'request_manager': + return RequestManagerNotificationToJSON(value); + case 'save': + return SaveNotificationToJSON(value); + case 'save_of_repost': + return SaveOfRepostNotificationToJSON(value); + case 'supporter_dethroned': + return SupporterDethronedNotificationToJSON(value); + case 'supporter_rank_up': + return SupporterRankUpNotificationToJSON(value); + case 'supporting_rank_up': + return SupporterRankUpNotificationToJSON(value); + case 'tastemaker': + return TastemakerNotificationToJSON(value); + case 'tier_change': + return TierChangeNotificationToJSON(value); + case 'tip_receive': + return ReceiveTipNotificationToJSON(value); + case 'tip_send': + return SendTipNotificationToJSON(value); + case 'track_added_to_playlist': + return TrackAddedToPlaylistNotificationToJSON(value); + case 'track_added_to_purchased_album': + return TrackAddedToPurchasedAlbumNotificationToJSON(value); + case 'trending': + return TrendingNotificationToJSON(value); + case 'trending_playlist': + return TrendingPlaylistNotificationToJSON(value); + case 'trending_underground': + return TrendingUndergroundNotificationToJSON(value); + case 'usdc_purchase_buyer': + return UsdcPurchaseBuyerNotificationToJSON(value); + case 'usdc_purchase_seller': + return UsdcPurchaseSellerNotificationToJSON(value); + default: + throw new Error(`No variant of Notification exists with 'type=${value['type']}'`); + } + +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Notifications.ts b/packages/sdk/src/sdk/api/generated/default/models/Notifications.ts new file mode 100644 index 00000000000..79ab4832dc3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Notifications.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Notification } from './Notification'; +import { + NotificationFromJSON, + NotificationFromJSONTyped, + NotificationToJSON, +} from './Notification'; + +/** + * + * @export + * @interface Notifications + */ +export interface Notifications { + /** + * + * @type {Array} + * @memberof Notifications + */ + notifications?: Array; + /** + * + * @type {number} + * @memberof Notifications + */ + unreadCount: number; +} + +/** + * Check if a given object implements the Notifications interface. + */ +export function instanceOfNotifications(value: object): value is Notifications { + let isInstance = true; + isInstance = isInstance && "unreadCount" in value && value["unreadCount"] !== undefined; + + return isInstance; +} + +export function NotificationsFromJSON(json: any): Notifications { + return NotificationsFromJSONTyped(json, false); +} + +export function NotificationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Notifications { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'notifications': !exists(json, 'notifications') ? undefined : ((json['notifications'] as Array).map(NotificationFromJSON)), + 'unreadCount': json['unread_count'], + }; +} + +export function NotificationsToJSON(value?: Notifications | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'notifications': value.notifications === undefined ? undefined : ((value.notifications as Array).map(NotificationToJSON)), + 'unread_count': value.unreadCount, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/NotificationsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/NotificationsResponse.ts new file mode 100644 index 00000000000..2e7bb206643 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/NotificationsResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Notifications } from './Notifications'; +import { + NotificationsFromJSON, + NotificationsFromJSONTyped, + NotificationsToJSON, +} from './Notifications'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface NotificationsResponse + */ +export interface NotificationsResponse { + /** + * + * @type {number} + * @memberof NotificationsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof NotificationsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof NotificationsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof NotificationsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof NotificationsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof NotificationsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof NotificationsResponse + */ + version: VersionMetadata; + /** + * + * @type {Notifications} + * @memberof NotificationsResponse + */ + data?: Notifications; +} + +/** + * Check if a given object implements the NotificationsResponse interface. + */ +export function instanceOfNotificationsResponse(value: object): value is NotificationsResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function NotificationsResponseFromJSON(json: any): NotificationsResponse { + return NotificationsResponseFromJSONTyped(json, false); +} + +export function NotificationsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationsResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : NotificationsFromJSON(json['data']), + }; +} + +export function NotificationsResponseToJSON(value?: NotificationsResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': NotificationsToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtworkFull.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtworkFull.ts new file mode 100644 index 00000000000..3fa04fdb230 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtworkFull.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PlaylistArtworkFull + */ +export interface PlaylistArtworkFull { + /** + * + * @type {string} + * @memberof PlaylistArtworkFull + */ + _150x150?: string; + /** + * + * @type {string} + * @memberof PlaylistArtworkFull + */ + _480x480?: string; + /** + * + * @type {string} + * @memberof PlaylistArtworkFull + */ + _1000x1000?: string; + /** + * + * @type {Array} + * @memberof PlaylistArtworkFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the PlaylistArtworkFull interface. + */ +export function instanceOfPlaylistArtworkFull(value: object): value is PlaylistArtworkFull { + let isInstance = true; + + return isInstance; +} + +export function PlaylistArtworkFullFromJSON(json: any): PlaylistArtworkFull { + return PlaylistArtworkFullFromJSONTyped(json, false); +} + +export function PlaylistArtworkFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistArtworkFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_150x150': !exists(json, '150x150') ? undefined : json['150x150'], + '_480x480': !exists(json, '480x480') ? undefined : json['480x480'], + '_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function PlaylistArtworkFullToJSON(value?: PlaylistArtworkFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '150x150': value._150x150, + '480x480': value._480x480, + '1000x1000': value._1000x1000, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistFeedItem.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFeedItem.ts new file mode 100644 index 00000000000..85722209319 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFeedItem.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PlaylistFull } from './PlaylistFull'; +import { + PlaylistFullFromJSON, + PlaylistFullFromJSONTyped, + PlaylistFullToJSON, +} from './PlaylistFull'; + +/** + * + * @export + * @interface PlaylistFeedItem + */ +export interface PlaylistFeedItem { + /** + * + * @type {string} + * @memberof PlaylistFeedItem + */ + type: string; + /** + * + * @type {PlaylistFull} + * @memberof PlaylistFeedItem + */ + item: PlaylistFull; +} + +/** + * Check if a given object implements the PlaylistFeedItem interface. + */ +export function instanceOfPlaylistFeedItem(value: object): value is PlaylistFeedItem { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + + return isInstance; +} + +export function PlaylistFeedItemFromJSON(json: any): PlaylistFeedItem { + return PlaylistFeedItemFromJSONTyped(json, false); +} + +export function PlaylistFeedItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistFeedItem { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'item': PlaylistFullFromJSON(json['item']), + }; +} + +export function PlaylistFeedItemToJSON(value?: PlaylistFeedItem | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'item': PlaylistFullToJSON(value.item), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistFull.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFull.ts new file mode 100644 index 00000000000..cd89f6a8460 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFull.ts @@ -0,0 +1,458 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { PlaylistAddedTimestamp } from './PlaylistAddedTimestamp'; +import { + PlaylistAddedTimestampFromJSON, + PlaylistAddedTimestampFromJSONTyped, + PlaylistAddedTimestampToJSON, +} from './PlaylistAddedTimestamp'; +import type { PlaylistArtwork } from './PlaylistArtwork'; +import { + PlaylistArtworkFromJSON, + PlaylistArtworkFromJSONTyped, + PlaylistArtworkToJSON, +} from './PlaylistArtwork'; +import type { PlaylistArtworkFull } from './PlaylistArtworkFull'; +import { + PlaylistArtworkFullFromJSON, + PlaylistArtworkFullFromJSONTyped, + PlaylistArtworkFullToJSON, +} from './PlaylistArtworkFull'; +import type { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { TrackFull } from './TrackFull'; +import { + TrackFullFromJSON, + TrackFullFromJSONTyped, + TrackFullToJSON, +} from './TrackFull'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface PlaylistFull + */ +export interface PlaylistFull { + /** + * + * @type {PlaylistArtworkFull} + * @memberof PlaylistFull + */ + artwork?: PlaylistArtworkFull; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + description?: string; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + permalink: string; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + id: string; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + totalPlayCount: number; + /** + * + * @type {UserFull} + * @memberof PlaylistFull + */ + user: UserFull; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof PlaylistFull + */ + access: Access; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + upc?: string; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + trackCount: number; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + followeeReposts: Array; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + followeeFavorites: Array; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof PlaylistFull + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + userId: string; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistFull + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof PlaylistFull + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof PlaylistFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + artists?: Array; + /** + * + * @type {object} + * @memberof PlaylistFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof PlaylistFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + parentalWarningType?: string; +} + +/** + * Check if a given object implements the PlaylistFull interface. + */ +export function instanceOfPlaylistFull(value: object): value is PlaylistFull { + let isInstance = true; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "isImageAutogenerated" in value && value["isImageAutogenerated"] !== undefined; + isInstance = isInstance && "playlistName" in value && value["playlistName"] !== undefined; + isInstance = isInstance && "playlistContents" in value && value["playlistContents"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "totalPlayCount" in value && value["totalPlayCount"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "followeeReposts" in value && value["followeeReposts"] !== undefined; + isInstance = isInstance && "followeeFavorites" in value && value["followeeFavorites"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isPrivate" in value && value["isPrivate"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "addedTimestamps" in value && value["addedTimestamps"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + + return isInstance; +} + +export function PlaylistFullFromJSON(json: any): PlaylistFull { + return PlaylistFullFromJSONTyped(json, false); +} + +export function PlaylistFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : PlaylistArtworkFullFromJSON(json['artwork']), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'permalink': json['permalink'], + 'id': json['id'], + 'isAlbum': json['is_album'], + 'isImageAutogenerated': json['is_image_autogenerated'], + 'playlistName': json['playlist_name'], + 'playlistContents': ((json['playlist_contents'] as Array).map(PlaylistAddedTimestampFromJSON)), + 'repostCount': json['repost_count'], + 'favoriteCount': json['favorite_count'], + 'totalPlayCount': json['total_play_count'], + 'user': UserFullFromJSON(json['user']), + 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], + 'access': AccessFromJSON(json['access']), + 'upc': !exists(json, 'upc') ? undefined : json['upc'], + 'trackCount': json['track_count'], + 'blocknumber': json['blocknumber'], + 'createdAt': json['created_at'], + 'followeeReposts': ((json['followee_reposts'] as Array).map(RepostFromJSON)), + 'followeeFavorites': ((json['followee_favorites'] as Array).map(FavoriteFromJSON)), + 'hasCurrentUserReposted': json['has_current_user_reposted'], + 'hasCurrentUserSaved': json['has_current_user_saved'], + 'isDelete': json['is_delete'], + 'isPrivate': json['is_private'], + 'updatedAt': json['updated_at'], + 'addedTimestamps': ((json['added_timestamps'] as Array).map(PlaylistAddedTimestampFromJSON)), + 'userId': json['user_id'], + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(TrackFullFromJSON)), + 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], + 'coverArtSizes': !exists(json, 'cover_art_sizes') ? undefined : json['cover_art_sizes'], + 'coverArtCids': !exists(json, 'cover_art_cids') ? undefined : PlaylistArtworkFromJSON(json['cover_art_cids']), + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isScheduledRelease': json['is_scheduled_release'], + 'releaseDate': !exists(json, 'release_date') ? undefined : json['release_date'], + 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], + 'artists': !exists(json, 'artists') ? undefined : json['artists'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + }; +} + +export function PlaylistFullToJSON(value?: PlaylistFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': PlaylistArtworkFullToJSON(value.artwork), + 'description': value.description, + 'permalink': value.permalink, + 'id': value.id, + 'is_album': value.isAlbum, + 'is_image_autogenerated': value.isImageAutogenerated, + 'playlist_name': value.playlistName, + 'playlist_contents': ((value.playlistContents as Array).map(PlaylistAddedTimestampToJSON)), + 'repost_count': value.repostCount, + 'favorite_count': value.favoriteCount, + 'total_play_count': value.totalPlayCount, + 'user': UserFullToJSON(value.user), + 'ddex_app': value.ddexApp, + 'access': AccessToJSON(value.access), + 'upc': value.upc, + 'track_count': value.trackCount, + 'blocknumber': value.blocknumber, + 'created_at': value.createdAt, + 'followee_reposts': ((value.followeeReposts as Array).map(RepostToJSON)), + 'followee_favorites': ((value.followeeFavorites as Array).map(FavoriteToJSON)), + 'has_current_user_reposted': value.hasCurrentUserReposted, + 'has_current_user_saved': value.hasCurrentUserSaved, + 'is_delete': value.isDelete, + 'is_private': value.isPrivate, + 'updated_at': value.updatedAt, + 'added_timestamps': ((value.addedTimestamps as Array).map(PlaylistAddedTimestampToJSON)), + 'user_id': value.userId, + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(TrackFullToJSON)), + 'cover_art': value.coverArt, + 'cover_art_sizes': value.coverArtSizes, + 'cover_art_cids': PlaylistArtworkToJSON(value.coverArtCids), + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_scheduled_release': value.isScheduledRelease, + 'release_date': value.releaseDate, + 'ddex_release_ids': value.ddexReleaseIds, + 'artists': value.artists, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistFullWithoutTracks.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFullWithoutTracks.ts new file mode 100644 index 00000000000..3fde842e299 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFullWithoutTracks.ts @@ -0,0 +1,458 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { PlaylistAddedTimestamp } from './PlaylistAddedTimestamp'; +import { + PlaylistAddedTimestampFromJSON, + PlaylistAddedTimestampFromJSONTyped, + PlaylistAddedTimestampToJSON, +} from './PlaylistAddedTimestamp'; +import type { PlaylistArtwork } from './PlaylistArtwork'; +import { + PlaylistArtworkFromJSON, + PlaylistArtworkFromJSONTyped, + PlaylistArtworkToJSON, +} from './PlaylistArtwork'; +import type { PlaylistArtworkFull } from './PlaylistArtworkFull'; +import { + PlaylistArtworkFullFromJSON, + PlaylistArtworkFullFromJSONTyped, + PlaylistArtworkFullToJSON, +} from './PlaylistArtworkFull'; +import type { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { TrackFull } from './TrackFull'; +import { + TrackFullFromJSON, + TrackFullFromJSONTyped, + TrackFullToJSON, +} from './TrackFull'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface PlaylistFullWithoutTracks + */ +export interface PlaylistFullWithoutTracks { + /** + * + * @type {PlaylistArtworkFull} + * @memberof PlaylistFullWithoutTracks + */ + artwork?: PlaylistArtworkFull; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + description?: string; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + permalink: string; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + id: string; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + repostCount: number; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + totalPlayCount: number; + /** + * + * @type {UserFull} + * @memberof PlaylistFullWithoutTracks + */ + user: UserFull; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof PlaylistFullWithoutTracks + */ + access: Access; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + upc?: string; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + trackCount: number; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + followeeReposts: Array; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + followeeFavorites: Array; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + userId: string; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistFullWithoutTracks + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof PlaylistFullWithoutTracks + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof PlaylistFullWithoutTracks + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + artists?: Array; + /** + * + * @type {object} + * @memberof PlaylistFullWithoutTracks + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof PlaylistFullWithoutTracks + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + parentalWarningType?: string; +} + +/** + * Check if a given object implements the PlaylistFullWithoutTracks interface. + */ +export function instanceOfPlaylistFullWithoutTracks(value: object): value is PlaylistFullWithoutTracks { + let isInstance = true; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "isImageAutogenerated" in value && value["isImageAutogenerated"] !== undefined; + isInstance = isInstance && "playlistName" in value && value["playlistName"] !== undefined; + isInstance = isInstance && "playlistContents" in value && value["playlistContents"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "totalPlayCount" in value && value["totalPlayCount"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "followeeReposts" in value && value["followeeReposts"] !== undefined; + isInstance = isInstance && "followeeFavorites" in value && value["followeeFavorites"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isPrivate" in value && value["isPrivate"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "addedTimestamps" in value && value["addedTimestamps"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + + return isInstance; +} + +export function PlaylistFullWithoutTracksFromJSON(json: any): PlaylistFullWithoutTracks { + return PlaylistFullWithoutTracksFromJSONTyped(json, false); +} + +export function PlaylistFullWithoutTracksFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistFullWithoutTracks { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : PlaylistArtworkFullFromJSON(json['artwork']), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'permalink': json['permalink'], + 'id': json['id'], + 'isAlbum': json['is_album'], + 'isImageAutogenerated': json['is_image_autogenerated'], + 'playlistName': json['playlist_name'], + 'playlistContents': ((json['playlist_contents'] as Array).map(PlaylistAddedTimestampFromJSON)), + 'repostCount': json['repost_count'], + 'favoriteCount': json['favorite_count'], + 'totalPlayCount': json['total_play_count'], + 'user': UserFullFromJSON(json['user']), + 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], + 'access': AccessFromJSON(json['access']), + 'upc': !exists(json, 'upc') ? undefined : json['upc'], + 'trackCount': json['track_count'], + 'blocknumber': json['blocknumber'], + 'createdAt': json['created_at'], + 'followeeReposts': ((json['followee_reposts'] as Array).map(RepostFromJSON)), + 'followeeFavorites': ((json['followee_favorites'] as Array).map(FavoriteFromJSON)), + 'hasCurrentUserReposted': json['has_current_user_reposted'], + 'hasCurrentUserSaved': json['has_current_user_saved'], + 'isDelete': json['is_delete'], + 'isPrivate': json['is_private'], + 'updatedAt': json['updated_at'], + 'addedTimestamps': ((json['added_timestamps'] as Array).map(PlaylistAddedTimestampFromJSON)), + 'userId': json['user_id'], + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(TrackFullFromJSON)), + 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], + 'coverArtSizes': !exists(json, 'cover_art_sizes') ? undefined : json['cover_art_sizes'], + 'coverArtCids': !exists(json, 'cover_art_cids') ? undefined : PlaylistArtworkFromJSON(json['cover_art_cids']), + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isScheduledRelease': json['is_scheduled_release'], + 'releaseDate': !exists(json, 'release_date') ? undefined : json['release_date'], + 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], + 'artists': !exists(json, 'artists') ? undefined : json['artists'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + }; +} + +export function PlaylistFullWithoutTracksToJSON(value?: PlaylistFullWithoutTracks | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': PlaylistArtworkFullToJSON(value.artwork), + 'description': value.description, + 'permalink': value.permalink, + 'id': value.id, + 'is_album': value.isAlbum, + 'is_image_autogenerated': value.isImageAutogenerated, + 'playlist_name': value.playlistName, + 'playlist_contents': ((value.playlistContents as Array).map(PlaylistAddedTimestampToJSON)), + 'repost_count': value.repostCount, + 'favorite_count': value.favoriteCount, + 'total_play_count': value.totalPlayCount, + 'user': UserFullToJSON(value.user), + 'ddex_app': value.ddexApp, + 'access': AccessToJSON(value.access), + 'upc': value.upc, + 'track_count': value.trackCount, + 'blocknumber': value.blocknumber, + 'created_at': value.createdAt, + 'followee_reposts': ((value.followeeReposts as Array).map(RepostToJSON)), + 'followee_favorites': ((value.followeeFavorites as Array).map(FavoriteToJSON)), + 'has_current_user_reposted': value.hasCurrentUserReposted, + 'has_current_user_saved': value.hasCurrentUserSaved, + 'is_delete': value.isDelete, + 'is_private': value.isPrivate, + 'updated_at': value.updatedAt, + 'added_timestamps': ((value.addedTimestamps as Array).map(PlaylistAddedTimestampToJSON)), + 'user_id': value.userId, + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(TrackFullToJSON)), + 'cover_art': value.coverArt, + 'cover_art_sizes': value.coverArtSizes, + 'cover_art_cids': PlaylistArtworkToJSON(value.coverArtCids), + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_scheduled_release': value.isScheduledRelease, + 'release_date': value.releaseDate, + 'ddex_release_ids': value.ddexReleaseIds, + 'artists': value.artists, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistLibrary.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistLibrary.ts new file mode 100644 index 00000000000..07b64242e5f --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistLibrary.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PlaylistLibrary + */ +export interface PlaylistLibrary { + /** + * + * @type {Array} + * @memberof PlaylistLibrary + */ + contents?: Array; +} + +/** + * Check if a given object implements the PlaylistLibrary interface. + */ +export function instanceOfPlaylistLibrary(value: object): value is PlaylistLibrary { + let isInstance = true; + + return isInstance; +} + +export function PlaylistLibraryFromJSON(json: any): PlaylistLibrary { + return PlaylistLibraryFromJSONTyped(json, false); +} + +export function PlaylistLibraryFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistLibrary { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'contents': !exists(json, 'contents') ? undefined : json['contents'], + }; +} + +export function PlaylistLibraryToJSON(value?: PlaylistLibrary | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'contents': value.contents, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistMilestoneNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistMilestoneNotificationActionData.ts new file mode 100644 index 00000000000..f1af24c664c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistMilestoneNotificationActionData.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PlaylistMilestoneNotificationActionData + */ +export interface PlaylistMilestoneNotificationActionData { + /** + * + * @type {string} + * @memberof PlaylistMilestoneNotificationActionData + */ + type: string; + /** + * + * @type {number} + * @memberof PlaylistMilestoneNotificationActionData + */ + threshold: number; + /** + * + * @type {string} + * @memberof PlaylistMilestoneNotificationActionData + */ + playlistId: string; + /** + * + * @type {boolean} + * @memberof PlaylistMilestoneNotificationActionData + */ + isAlbum: boolean; +} + +/** + * Check if a given object implements the PlaylistMilestoneNotificationActionData interface. + */ +export function instanceOfPlaylistMilestoneNotificationActionData(value: object): value is PlaylistMilestoneNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "threshold" in value && value["threshold"] !== undefined; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + + return isInstance; +} + +export function PlaylistMilestoneNotificationActionDataFromJSON(json: any): PlaylistMilestoneNotificationActionData { + return PlaylistMilestoneNotificationActionDataFromJSONTyped(json, false); +} + +export function PlaylistMilestoneNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistMilestoneNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'threshold': json['threshold'], + 'playlistId': json['playlist_id'], + 'isAlbum': json['is_album'], + }; +} + +export function PlaylistMilestoneNotificationActionDataToJSON(value?: PlaylistMilestoneNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'threshold': value.threshold, + 'playlist_id': value.playlistId, + 'is_album': value.isAlbum, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdate.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdate.ts new file mode 100644 index 00000000000..177c45de4ea --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdate.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PlaylistUpdate + */ +export interface PlaylistUpdate { + /** + * + * @type {string} + * @memberof PlaylistUpdate + */ + playlistId: string; + /** + * + * @type {number} + * @memberof PlaylistUpdate + */ + updatedAt: number; + /** + * + * @type {number} + * @memberof PlaylistUpdate + */ + lastSeenAt?: number; +} + +/** + * Check if a given object implements the PlaylistUpdate interface. + */ +export function instanceOfPlaylistUpdate(value: object): value is PlaylistUpdate { + let isInstance = true; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + + return isInstance; +} + +export function PlaylistUpdateFromJSON(json: any): PlaylistUpdate { + return PlaylistUpdateFromJSONTyped(json, false); +} + +export function PlaylistUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistUpdate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'playlistId': json['playlist_id'], + 'updatedAt': json['updated_at'], + 'lastSeenAt': !exists(json, 'last_seen_at') ? undefined : json['last_seen_at'], + }; +} + +export function PlaylistUpdateToJSON(value?: PlaylistUpdate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'playlist_id': value.playlistId, + 'updated_at': value.updatedAt, + 'last_seen_at': value.lastSeenAt, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdates.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdates.ts new file mode 100644 index 00000000000..ba48117ae58 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdates.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PlaylistUpdate } from './PlaylistUpdate'; +import { + PlaylistUpdateFromJSON, + PlaylistUpdateFromJSONTyped, + PlaylistUpdateToJSON, +} from './PlaylistUpdate'; + +/** + * + * @export + * @interface PlaylistUpdates + */ +export interface PlaylistUpdates { + /** + * + * @type {Array} + * @memberof PlaylistUpdates + */ + playlistUpdates?: Array; +} + +/** + * Check if a given object implements the PlaylistUpdates interface. + */ +export function instanceOfPlaylistUpdates(value: object): value is PlaylistUpdates { + let isInstance = true; + + return isInstance; +} + +export function PlaylistUpdatesFromJSON(json: any): PlaylistUpdates { + return PlaylistUpdatesFromJSONTyped(json, false); +} + +export function PlaylistUpdatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistUpdates { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'playlistUpdates': !exists(json, 'playlist_updates') ? undefined : ((json['playlist_updates'] as Array).map(PlaylistUpdateFromJSON)), + }; +} + +export function PlaylistUpdatesToJSON(value?: PlaylistUpdates | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'playlist_updates': value.playlistUpdates === undefined ? undefined : ((value.playlistUpdates as Array).map(PlaylistUpdateToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdatesResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdatesResponse.ts new file mode 100644 index 00000000000..b1bc2d2b9c7 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistUpdatesResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PlaylistUpdates } from './PlaylistUpdates'; +import { + PlaylistUpdatesFromJSON, + PlaylistUpdatesFromJSONTyped, + PlaylistUpdatesToJSON, +} from './PlaylistUpdates'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface PlaylistUpdatesResponse + */ +export interface PlaylistUpdatesResponse { + /** + * + * @type {number} + * @memberof PlaylistUpdatesResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PlaylistUpdatesResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PlaylistUpdatesResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PlaylistUpdatesResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PlaylistUpdatesResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PlaylistUpdatesResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PlaylistUpdatesResponse + */ + version: VersionMetadata; + /** + * + * @type {PlaylistUpdates} + * @memberof PlaylistUpdatesResponse + */ + data?: PlaylistUpdates; +} + +/** + * Check if a given object implements the PlaylistUpdatesResponse interface. + */ +export function instanceOfPlaylistUpdatesResponse(value: object): value is PlaylistUpdatesResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function PlaylistUpdatesResponseFromJSON(json: any): PlaylistUpdatesResponse { + return PlaylistUpdatesResponseFromJSONTyped(json, false); +} + +export function PlaylistUpdatesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistUpdatesResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : PlaylistUpdatesFromJSON(json['data']), + }; +} + +export function PlaylistUpdatesResponseToJSON(value?: PlaylistUpdatesResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': PlaylistUpdatesToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ProfilePictureFull.ts b/packages/sdk/src/sdk/api/generated/default/models/ProfilePictureFull.ts new file mode 100644 index 00000000000..2cacd5e1fe5 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ProfilePictureFull.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ProfilePictureFull + */ +export interface ProfilePictureFull { + /** + * + * @type {string} + * @memberof ProfilePictureFull + */ + _150x150?: string; + /** + * + * @type {string} + * @memberof ProfilePictureFull + */ + _480x480?: string; + /** + * + * @type {string} + * @memberof ProfilePictureFull + */ + _1000x1000?: string; + /** + * + * @type {Array} + * @memberof ProfilePictureFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the ProfilePictureFull interface. + */ +export function instanceOfProfilePictureFull(value: object): value is ProfilePictureFull { + let isInstance = true; + + return isInstance; +} + +export function ProfilePictureFullFromJSON(json: any): ProfilePictureFull { + return ProfilePictureFullFromJSONTyped(json, false); +} + +export function ProfilePictureFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProfilePictureFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_150x150': !exists(json, '150x150') ? undefined : json['150x150'], + '_480x480': !exists(json, '480x480') ? undefined : json['480x480'], + '_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function ProfilePictureFullToJSON(value?: ProfilePictureFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '150x150': value._150x150, + '480x480': value._480x480, + '1000x1000': value._1000x1000, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Purchase.ts b/packages/sdk/src/sdk/api/generated/default/models/Purchase.ts new file mode 100644 index 00000000000..591c0673030 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Purchase.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PurchaseSplit } from './PurchaseSplit'; +import { + PurchaseSplitFromJSON, + PurchaseSplitFromJSONTyped, + PurchaseSplitToJSON, +} from './PurchaseSplit'; + +import { +} from './'; + +/** + * + * @export + * @interface Purchase + */ +export interface Purchase { + /** + * + * @type {number} + * @memberof Purchase + */ + slot: number; + /** + * + * @type {string} + * @memberof Purchase + */ + signature: string; + /** + * + * @type {string} + * @memberof Purchase + */ + sellerUserId: string; + /** + * + * @type {string} + * @memberof Purchase + */ + buyerUserId: string; + /** + * + * @type {string} + * @memberof Purchase + */ + amount: string; + /** + * + * @type {string} + * @memberof Purchase + */ + extraAmount: string; + /** + * + * @type {string} + * @memberof Purchase + */ + contentType: string; + /** + * + * @type {string} + * @memberof Purchase + */ + contentId: string; + /** + * + * @type {string} + * @memberof Purchase + */ + createdAt: string; + /** + * + * @type {string} + * @memberof Purchase + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof Purchase + */ + access: string; + /** + * + * @type {Array} + * @memberof Purchase + */ + splits: Array; +} + +/** + * Check if a given object implements the Purchase interface. + */ +export function instanceOfPurchase(value: object): value is Purchase { + let isInstance = true; + isInstance = isInstance && "slot" in value && value["slot"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "sellerUserId" in value && value["sellerUserId"] !== undefined; + isInstance = isInstance && "buyerUserId" in value && value["buyerUserId"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "extraAmount" in value && value["extraAmount"] !== undefined; + isInstance = isInstance && "contentType" in value && value["contentType"] !== undefined; + isInstance = isInstance && "contentId" in value && value["contentId"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "splits" in value && value["splits"] !== undefined; + + return isInstance; +} + +export function PurchaseFromJSON(json: any): Purchase { + return PurchaseFromJSONTyped(json, false); +} + +export function PurchaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Purchase { + if ((json === undefined) || (json === null)) { + return json; + } + if (!ignoreDiscriminator) { + } + return { + + 'slot': json['slot'], + 'signature': json['signature'], + 'sellerUserId': json['seller_user_id'], + 'buyerUserId': json['buyer_user_id'], + 'amount': json['amount'], + 'extraAmount': json['extra_amount'], + 'contentType': json['content_type'], + 'contentId': json['content_id'], + 'createdAt': json['created_at'], + 'updatedAt': json['updated_at'], + 'access': json['access'], + 'splits': ((json['splits'] as Array).map(PurchaseSplitFromJSON)), + }; +} + +export function PurchaseToJSON(value?: Purchase | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'slot': value.slot, + 'signature': value.signature, + 'seller_user_id': value.sellerUserId, + 'buyer_user_id': value.buyerUserId, + 'amount': value.amount, + 'extra_amount': value.extraAmount, + 'content_type': value.contentType, + 'content_id': value.contentId, + 'created_at': value.createdAt, + 'updated_at': value.updatedAt, + 'access': value.access, + 'splits': ((value.splits as Array).map(PurchaseSplitToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PurchaseSplit.ts b/packages/sdk/src/sdk/api/generated/default/models/PurchaseSplit.ts new file mode 100644 index 00000000000..f4a4b05863b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PurchaseSplit.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PurchaseSplit + */ +export interface PurchaseSplit { + /** + * + * @type {number} + * @memberof PurchaseSplit + */ + userId?: number; + /** + * + * @type {string} + * @memberof PurchaseSplit + */ + payoutWallet: string; + /** + * + * @type {string} + * @memberof PurchaseSplit + */ + amount: string; +} + +/** + * Check if a given object implements the PurchaseSplit interface. + */ +export function instanceOfPurchaseSplit(value: object): value is PurchaseSplit { + let isInstance = true; + isInstance = isInstance && "payoutWallet" in value && value["payoutWallet"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + + return isInstance; +} + +export function PurchaseSplitFromJSON(json: any): PurchaseSplit { + return PurchaseSplitFromJSONTyped(json, false); +} + +export function PurchaseSplitFromJSONTyped(json: any, ignoreDiscriminator: boolean): PurchaseSplit { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': !exists(json, 'user_id') ? undefined : json['user_id'], + 'payoutWallet': json['payout_wallet'], + 'amount': json['amount'], + }; +} + +export function PurchaseSplitToJSON(value?: PurchaseSplit | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user_id': value.userId, + 'payout_wallet': value.payoutWallet, + 'amount': value.amount, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PurchasersCountResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PurchasersCountResponse.ts new file mode 100644 index 00000000000..103d5642e46 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PurchasersCountResponse.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface PurchasersCountResponse + */ +export interface PurchasersCountResponse { + /** + * + * @type {number} + * @memberof PurchasersCountResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PurchasersCountResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PurchasersCountResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PurchasersCountResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PurchasersCountResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PurchasersCountResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PurchasersCountResponse + */ + version: VersionMetadata; + /** + * + * @type {number} + * @memberof PurchasersCountResponse + */ + data?: number; +} + +/** + * Check if a given object implements the PurchasersCountResponse interface. + */ +export function instanceOfPurchasersCountResponse(value: object): value is PurchasersCountResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function PurchasersCountResponseFromJSON(json: any): PurchasersCountResponse { + return PurchasersCountResponseFromJSONTyped(json, false); +} + +export function PurchasersCountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PurchasersCountResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : json['data'], + }; +} + +export function PurchasersCountResponseToJSON(value?: PurchasersCountResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PurchasesCountResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PurchasesCountResponse.ts new file mode 100644 index 00000000000..5164f35ff44 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PurchasesCountResponse.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface PurchasesCountResponse + */ +export interface PurchasesCountResponse { + /** + * + * @type {number} + * @memberof PurchasesCountResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PurchasesCountResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PurchasesCountResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PurchasesCountResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PurchasesCountResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PurchasesCountResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PurchasesCountResponse + */ + version: VersionMetadata; + /** + * + * @type {number} + * @memberof PurchasesCountResponse + */ + data?: number; +} + +/** + * Check if a given object implements the PurchasesCountResponse interface. + */ +export function instanceOfPurchasesCountResponse(value: object): value is PurchasesCountResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function PurchasesCountResponseFromJSON(json: any): PurchasesCountResponse { + return PurchasesCountResponseFromJSONTyped(json, false); +} + +export function PurchasesCountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PurchasesCountResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : json['data'], + }; +} + +export function PurchasesCountResponseToJSON(value?: PurchasesCountResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PurchasesResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PurchasesResponse.ts new file mode 100644 index 00000000000..ef9b5aee8a7 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PurchasesResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Purchase } from './Purchase'; +import { + PurchaseFromJSON, + PurchaseFromJSONTyped, + PurchaseToJSON, +} from './Purchase'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface PurchasesResponse + */ +export interface PurchasesResponse { + /** + * + * @type {number} + * @memberof PurchasesResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PurchasesResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PurchasesResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PurchasesResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PurchasesResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PurchasesResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PurchasesResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof PurchasesResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the PurchasesResponse interface. + */ +export function instanceOfPurchasesResponse(value: object): value is PurchasesResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function PurchasesResponseFromJSON(json: any): PurchasesResponse { + return PurchasesResponseFromJSONTyped(json, false); +} + +export function PurchasesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PurchasesResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(PurchaseFromJSON)), + }; +} + +export function PurchasesResponseToJSON(value?: PurchasesResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(PurchaseToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Reaction.ts b/packages/sdk/src/sdk/api/generated/default/models/Reaction.ts new file mode 100644 index 00000000000..1de69699db3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Reaction.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface Reaction + */ +export interface Reaction { + /** + * + * @type {string} + * @memberof Reaction + */ + reactionValue: string; + /** + * + * @type {string} + * @memberof Reaction + */ + reactionType: string; + /** + * + * @type {string} + * @memberof Reaction + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof Reaction + */ + reactedTo: string; +} + +/** + * Check if a given object implements the Reaction interface. + */ +export function instanceOfReaction(value: object): value is Reaction { + let isInstance = true; + isInstance = isInstance && "reactionValue" in value && value["reactionValue"] !== undefined; + isInstance = isInstance && "reactionType" in value && value["reactionType"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "reactedTo" in value && value["reactedTo"] !== undefined; + + return isInstance; +} + +export function ReactionFromJSON(json: any): Reaction { + return ReactionFromJSONTyped(json, false); +} + +export function ReactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Reaction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'reactionValue': json['reaction_value'], + 'reactionType': json['reaction_type'], + 'senderUserId': json['sender_user_id'], + 'reactedTo': json['reacted_to'], + }; +} + +export function ReactionToJSON(value?: Reaction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'reaction_value': value.reactionValue, + 'reaction_type': value.reactionType, + 'sender_user_id': value.senderUserId, + 'reacted_to': value.reactedTo, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReactionNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ReactionNotification.ts new file mode 100644 index 00000000000..39627d17a07 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReactionNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ReactionNotificationAction } from './ReactionNotificationAction'; +import { + ReactionNotificationActionFromJSON, + ReactionNotificationActionFromJSONTyped, + ReactionNotificationActionToJSON, +} from './ReactionNotificationAction'; + +/** + * + * @export + * @interface ReactionNotification + */ +export interface ReactionNotification { + /** + * + * @type {string} + * @memberof ReactionNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ReactionNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ReactionNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ReactionNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ReactionNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ReactionNotification interface. + */ +export function instanceOfReactionNotification(value: object): value is ReactionNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ReactionNotificationFromJSON(json: any): ReactionNotification { + return ReactionNotificationFromJSONTyped(json, false); +} + +export function ReactionNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReactionNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ReactionNotificationActionFromJSON)), + }; +} + +export function ReactionNotificationToJSON(value?: ReactionNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ReactionNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationAction.ts new file mode 100644 index 00000000000..fed9803ee7e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ReactionNotificationActionData } from './ReactionNotificationActionData'; +import { + ReactionNotificationActionDataFromJSON, + ReactionNotificationActionDataFromJSONTyped, + ReactionNotificationActionDataToJSON, +} from './ReactionNotificationActionData'; + +/** + * + * @export + * @interface ReactionNotificationAction + */ +export interface ReactionNotificationAction { + /** + * + * @type {string} + * @memberof ReactionNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ReactionNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ReactionNotificationAction + */ + timestamp: number; + /** + * + * @type {ReactionNotificationActionData} + * @memberof ReactionNotificationAction + */ + data: ReactionNotificationActionData; +} + +/** + * Check if a given object implements the ReactionNotificationAction interface. + */ +export function instanceOfReactionNotificationAction(value: object): value is ReactionNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ReactionNotificationActionFromJSON(json: any): ReactionNotificationAction { + return ReactionNotificationActionFromJSONTyped(json, false); +} + +export function ReactionNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReactionNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ReactionNotificationActionDataFromJSON(json['data']), + }; +} + +export function ReactionNotificationActionToJSON(value?: ReactionNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ReactionNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationActionData.ts new file mode 100644 index 00000000000..735152c18c8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReactionNotificationActionData.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ReactionNotificationActionData + */ +export interface ReactionNotificationActionData { + /** + * + * @type {string} + * @memberof ReactionNotificationActionData + */ + reactedTo: string; + /** + * + * @type {string} + * @memberof ReactionNotificationActionData + */ + reactionType: string; + /** + * + * @type {number} + * @memberof ReactionNotificationActionData + */ + reactionValue: number; + /** + * + * @type {string} + * @memberof ReactionNotificationActionData + */ + receiverUserId: string; + /** + * + * @type {string} + * @memberof ReactionNotificationActionData + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof ReactionNotificationActionData + */ + senderWallet: string; + /** + * + * @type {string} + * @memberof ReactionNotificationActionData + */ + tipAmount: string; +} + +/** + * Check if a given object implements the ReactionNotificationActionData interface. + */ +export function instanceOfReactionNotificationActionData(value: object): value is ReactionNotificationActionData { + let isInstance = true; + isInstance = isInstance && "reactedTo" in value && value["reactedTo"] !== undefined; + isInstance = isInstance && "reactionType" in value && value["reactionType"] !== undefined; + isInstance = isInstance && "reactionValue" in value && value["reactionValue"] !== undefined; + isInstance = isInstance && "receiverUserId" in value && value["receiverUserId"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "senderWallet" in value && value["senderWallet"] !== undefined; + isInstance = isInstance && "tipAmount" in value && value["tipAmount"] !== undefined; + + return isInstance; +} + +export function ReactionNotificationActionDataFromJSON(json: any): ReactionNotificationActionData { + return ReactionNotificationActionDataFromJSONTyped(json, false); +} + +export function ReactionNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReactionNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'reactedTo': json['reacted_to'], + 'reactionType': json['reaction_type'], + 'reactionValue': json['reaction_value'], + 'receiverUserId': json['receiver_user_id'], + 'senderUserId': json['sender_user_id'], + 'senderWallet': json['sender_wallet'], + 'tipAmount': json['tip_amount'], + }; +} + +export function ReactionNotificationActionDataToJSON(value?: ReactionNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'reacted_to': value.reactedTo, + 'reaction_type': value.reactionType, + 'reaction_value': value.reactionValue, + 'receiver_user_id': value.receiverUserId, + 'sender_user_id': value.senderUserId, + 'sender_wallet': value.senderWallet, + 'tip_amount': value.tipAmount, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Reactions.ts b/packages/sdk/src/sdk/api/generated/default/models/Reactions.ts new file mode 100644 index 00000000000..2c0a6cb8745 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Reactions.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Reaction } from './Reaction'; +import { + ReactionFromJSON, + ReactionFromJSONTyped, + ReactionToJSON, +} from './Reaction'; + +/** + * + * @export + * @interface Reactions + */ +export interface Reactions { + /** + * + * @type {Array} + * @memberof Reactions + */ + data?: Array; +} + +/** + * Check if a given object implements the Reactions interface. + */ +export function instanceOfReactions(value: object): value is Reactions { + let isInstance = true; + + return isInstance; +} + +export function ReactionsFromJSON(json: any): Reactions { + return ReactionsFromJSONTyped(json, false); +} + +export function ReactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Reactions { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(ReactionFromJSON)), + }; +} + +export function ReactionsToJSON(value?: Reactions | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': value.data === undefined ? undefined : ((value.data as Array).map(ReactionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotification.ts new file mode 100644 index 00000000000..c9450e275ce --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ReceiveTipNotificationAction } from './ReceiveTipNotificationAction'; +import { + ReceiveTipNotificationActionFromJSON, + ReceiveTipNotificationActionFromJSONTyped, + ReceiveTipNotificationActionToJSON, +} from './ReceiveTipNotificationAction'; + +/** + * + * @export + * @interface ReceiveTipNotification + */ +export interface ReceiveTipNotification { + /** + * + * @type {string} + * @memberof ReceiveTipNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ReceiveTipNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ReceiveTipNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ReceiveTipNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ReceiveTipNotification interface. + */ +export function instanceOfReceiveTipNotification(value: object): value is ReceiveTipNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ReceiveTipNotificationFromJSON(json: any): ReceiveTipNotification { + return ReceiveTipNotificationFromJSONTyped(json, false); +} + +export function ReceiveTipNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReceiveTipNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ReceiveTipNotificationActionFromJSON)), + }; +} + +export function ReceiveTipNotificationToJSON(value?: ReceiveTipNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ReceiveTipNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationAction.ts new file mode 100644 index 00000000000..54d49fc94e3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ReceiveTipNotificationActionData } from './ReceiveTipNotificationActionData'; +import { + ReceiveTipNotificationActionDataFromJSON, + ReceiveTipNotificationActionDataFromJSONTyped, + ReceiveTipNotificationActionDataToJSON, +} from './ReceiveTipNotificationActionData'; + +/** + * + * @export + * @interface ReceiveTipNotificationAction + */ +export interface ReceiveTipNotificationAction { + /** + * + * @type {string} + * @memberof ReceiveTipNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ReceiveTipNotificationAction + */ + timestamp: number; + /** + * + * @type {ReceiveTipNotificationActionData} + * @memberof ReceiveTipNotificationAction + */ + data: ReceiveTipNotificationActionData; +} + +/** + * Check if a given object implements the ReceiveTipNotificationAction interface. + */ +export function instanceOfReceiveTipNotificationAction(value: object): value is ReceiveTipNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ReceiveTipNotificationActionFromJSON(json: any): ReceiveTipNotificationAction { + return ReceiveTipNotificationActionFromJSONTyped(json, false); +} + +export function ReceiveTipNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReceiveTipNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ReceiveTipNotificationActionDataFromJSON(json['data']), + }; +} + +export function ReceiveTipNotificationActionToJSON(value?: ReceiveTipNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ReceiveTipNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationActionData.ts new file mode 100644 index 00000000000..cea1714fccc --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationActionData.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ReceiveTipNotificationActionData + */ +export interface ReceiveTipNotificationActionData { + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + receiverUserId: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + tipTxSignature: string; + /** + * + * @type {number} + * @memberof ReceiveTipNotificationActionData + */ + reactionValue: number; +} + +/** + * Check if a given object implements the ReceiveTipNotificationActionData interface. + */ +export function instanceOfReceiveTipNotificationActionData(value: object): value is ReceiveTipNotificationActionData { + let isInstance = true; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "receiverUserId" in value && value["receiverUserId"] !== undefined; + isInstance = isInstance && "tipTxSignature" in value && value["tipTxSignature"] !== undefined; + isInstance = isInstance && "reactionValue" in value && value["reactionValue"] !== undefined; + + return isInstance; +} + +export function ReceiveTipNotificationActionDataFromJSON(json: any): ReceiveTipNotificationActionData { + return ReceiveTipNotificationActionDataFromJSONTyped(json, false); +} + +export function ReceiveTipNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReceiveTipNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'amount': json['amount'], + 'senderUserId': json['sender_user_id'], + 'receiverUserId': json['receiver_user_id'], + 'tipTxSignature': json['tip_tx_signature'], + 'reactionValue': json['reaction_value'], + }; +} + +export function ReceiveTipNotificationActionDataToJSON(value?: ReceiveTipNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'amount': value.amount, + 'sender_user_id': value.senderUserId, + 'receiver_user_id': value.receiverUserId, + 'tip_tx_signature': value.tipTxSignature, + 'reaction_value': value.reactionValue, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RecordTrackDownloadRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/RecordTrackDownloadRequest.ts new file mode 100644 index 00000000000..deaa8c6e8d1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RecordTrackDownloadRequest.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RecordTrackDownloadRequest + */ +export interface RecordTrackDownloadRequest { + /** + * + * @type {string} + * @memberof RecordTrackDownloadRequest + */ + city?: string; + /** + * + * @type {string} + * @memberof RecordTrackDownloadRequest + */ + region?: string; + /** + * + * @type {string} + * @memberof RecordTrackDownloadRequest + */ + country?: string; +} + +/** + * Check if a given object implements the RecordTrackDownloadRequest interface. + */ +export function instanceOfRecordTrackDownloadRequest(value: object): value is RecordTrackDownloadRequest { + let isInstance = true; + + return isInstance; +} + +export function RecordTrackDownloadRequestFromJSON(json: any): RecordTrackDownloadRequest { + return RecordTrackDownloadRequestFromJSONTyped(json, false); +} + +export function RecordTrackDownloadRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordTrackDownloadRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'city': !exists(json, 'city') ? undefined : json['city'], + 'region': !exists(json, 'region') ? undefined : json['region'], + 'country': !exists(json, 'country') ? undefined : json['country'], + }; +} + +export function RecordTrackDownloadRequestToJSON(value?: RecordTrackDownloadRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'city': value.city, + 'region': value.region, + 'country': value.country, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RemixNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixNotification.ts new file mode 100644 index 00000000000..ce428a69961 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RemixNotificationAction } from './RemixNotificationAction'; +import { + RemixNotificationActionFromJSON, + RemixNotificationActionFromJSONTyped, + RemixNotificationActionToJSON, +} from './RemixNotificationAction'; + +/** + * + * @export + * @interface RemixNotification + */ +export interface RemixNotification { + /** + * + * @type {string} + * @memberof RemixNotification + */ + type: string; + /** + * + * @type {string} + * @memberof RemixNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof RemixNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof RemixNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof RemixNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the RemixNotification interface. + */ +export function instanceOfRemixNotification(value: object): value is RemixNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function RemixNotificationFromJSON(json: any): RemixNotification { + return RemixNotificationFromJSONTyped(json, false); +} + +export function RemixNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemixNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(RemixNotificationActionFromJSON)), + }; +} + +export function RemixNotificationToJSON(value?: RemixNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(RemixNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RemixNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixNotificationAction.ts new file mode 100644 index 00000000000..b6bf1e20cd1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RemixNotificationActionData } from './RemixNotificationActionData'; +import { + RemixNotificationActionDataFromJSON, + RemixNotificationActionDataFromJSONTyped, + RemixNotificationActionDataToJSON, +} from './RemixNotificationActionData'; + +/** + * + * @export + * @interface RemixNotificationAction + */ +export interface RemixNotificationAction { + /** + * + * @type {string} + * @memberof RemixNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof RemixNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof RemixNotificationAction + */ + timestamp: number; + /** + * + * @type {RemixNotificationActionData} + * @memberof RemixNotificationAction + */ + data: RemixNotificationActionData; +} + +/** + * Check if a given object implements the RemixNotificationAction interface. + */ +export function instanceOfRemixNotificationAction(value: object): value is RemixNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function RemixNotificationActionFromJSON(json: any): RemixNotificationAction { + return RemixNotificationActionFromJSONTyped(json, false); +} + +export function RemixNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemixNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': RemixNotificationActionDataFromJSON(json['data']), + }; +} + +export function RemixNotificationActionToJSON(value?: RemixNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': RemixNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RemixNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixNotificationActionData.ts new file mode 100644 index 00000000000..545faec69a1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RemixNotificationActionData + */ +export interface RemixNotificationActionData { + /** + * + * @type {string} + * @memberof RemixNotificationActionData + */ + parentTrackId: string; + /** + * + * @type {string} + * @memberof RemixNotificationActionData + */ + trackId: string; +} + +/** + * Check if a given object implements the RemixNotificationActionData interface. + */ +export function instanceOfRemixNotificationActionData(value: object): value is RemixNotificationActionData { + let isInstance = true; + isInstance = isInstance && "parentTrackId" in value && value["parentTrackId"] !== undefined; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + + return isInstance; +} + +export function RemixNotificationActionDataFromJSON(json: any): RemixNotificationActionData { + return RemixNotificationActionDataFromJSONTyped(json, false); +} + +export function RemixNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemixNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'parentTrackId': json['parent_track_id'], + 'trackId': json['track_id'], + }; +} + +export function RemixNotificationActionDataToJSON(value?: RemixNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'parent_track_id': value.parentTrackId, + 'track_id': value.trackId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RemixablesResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixablesResponse.ts new file mode 100644 index 00000000000..28d06623498 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixablesResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackFull } from './TrackFull'; +import { + TrackFullFromJSON, + TrackFullFromJSONTyped, + TrackFullToJSON, +} from './TrackFull'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface RemixablesResponse + */ +export interface RemixablesResponse { + /** + * + * @type {number} + * @memberof RemixablesResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof RemixablesResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof RemixablesResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof RemixablesResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof RemixablesResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof RemixablesResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof RemixablesResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof RemixablesResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the RemixablesResponse interface. + */ +export function instanceOfRemixablesResponse(value: object): value is RemixablesResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function RemixablesResponseFromJSON(json: any): RemixablesResponse { + return RemixablesResponseFromJSONTyped(json, false); +} + +export function RemixablesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemixablesResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(TrackFullFromJSON)), + }; +} + +export function RemixablesResponseToJSON(value?: RemixablesResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(TrackFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RemixersCountResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixersCountResponse.ts new file mode 100644 index 00000000000..5fd44bc1187 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixersCountResponse.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface RemixersCountResponse + */ +export interface RemixersCountResponse { + /** + * + * @type {number} + * @memberof RemixersCountResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof RemixersCountResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof RemixersCountResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof RemixersCountResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof RemixersCountResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof RemixersCountResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof RemixersCountResponse + */ + version: VersionMetadata; + /** + * + * @type {number} + * @memberof RemixersCountResponse + */ + data?: number; +} + +/** + * Check if a given object implements the RemixersCountResponse interface. + */ +export function instanceOfRemixersCountResponse(value: object): value is RemixersCountResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function RemixersCountResponseFromJSON(json: any): RemixersCountResponse { + return RemixersCountResponseFromJSONTyped(json, false); +} + +export function RemixersCountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemixersCountResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : json['data'], + }; +} + +export function RemixersCountResponseToJSON(value?: RemixersCountResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RepostNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/RepostNotification.ts new file mode 100644 index 00000000000..5b3a82603bd --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RepostNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RepostNotificationAction } from './RepostNotificationAction'; +import { + RepostNotificationActionFromJSON, + RepostNotificationActionFromJSONTyped, + RepostNotificationActionToJSON, +} from './RepostNotificationAction'; + +/** + * + * @export + * @interface RepostNotification + */ +export interface RepostNotification { + /** + * + * @type {string} + * @memberof RepostNotification + */ + type: string; + /** + * + * @type {string} + * @memberof RepostNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof RepostNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof RepostNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof RepostNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the RepostNotification interface. + */ +export function instanceOfRepostNotification(value: object): value is RepostNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function RepostNotificationFromJSON(json: any): RepostNotification { + return RepostNotificationFromJSONTyped(json, false); +} + +export function RepostNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepostNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(RepostNotificationActionFromJSON)), + }; +} + +export function RepostNotificationToJSON(value?: RepostNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(RepostNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RepostNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/RepostNotificationAction.ts new file mode 100644 index 00000000000..8ee13605b86 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RepostNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RepostNotificationActionData } from './RepostNotificationActionData'; +import { + RepostNotificationActionDataFromJSON, + RepostNotificationActionDataFromJSONTyped, + RepostNotificationActionDataToJSON, +} from './RepostNotificationActionData'; + +/** + * + * @export + * @interface RepostNotificationAction + */ +export interface RepostNotificationAction { + /** + * + * @type {string} + * @memberof RepostNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof RepostNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof RepostNotificationAction + */ + timestamp: number; + /** + * + * @type {RepostNotificationActionData} + * @memberof RepostNotificationAction + */ + data: RepostNotificationActionData; +} + +/** + * Check if a given object implements the RepostNotificationAction interface. + */ +export function instanceOfRepostNotificationAction(value: object): value is RepostNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function RepostNotificationActionFromJSON(json: any): RepostNotificationAction { + return RepostNotificationActionFromJSONTyped(json, false); +} + +export function RepostNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepostNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': RepostNotificationActionDataFromJSON(json['data']), + }; +} + +export function RepostNotificationActionToJSON(value?: RepostNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': RepostNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RepostNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/RepostNotificationActionData.ts new file mode 100644 index 00000000000..3790fcb58e4 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RepostNotificationActionData.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RepostNotificationActionData + */ +export interface RepostNotificationActionData { + /** + * + * @type {string} + * @memberof RepostNotificationActionData + */ + type: RepostNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof RepostNotificationActionData + */ + userId: string; + /** + * + * @type {string} + * @memberof RepostNotificationActionData + */ + repostItemId: string; +} + + +/** + * @export + */ +export const RepostNotificationActionDataTypeEnum = { + Track: 'track', + Playlist: 'playlist', + Album: 'album' +} as const; +export type RepostNotificationActionDataTypeEnum = typeof RepostNotificationActionDataTypeEnum[keyof typeof RepostNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the RepostNotificationActionData interface. + */ +export function instanceOfRepostNotificationActionData(value: object): value is RepostNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "repostItemId" in value && value["repostItemId"] !== undefined; + + return isInstance; +} + +export function RepostNotificationActionDataFromJSON(json: any): RepostNotificationActionData { + return RepostNotificationActionDataFromJSONTyped(json, false); +} + +export function RepostNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepostNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'userId': json['user_id'], + 'repostItemId': json['repost_item_id'], + }; +} + +export function RepostNotificationActionDataToJSON(value?: RepostNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'user_id': value.userId, + 'repost_item_id': value.repostItemId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotification.ts new file mode 100644 index 00000000000..ce54f4e1c78 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RepostOfRepostNotificationAction } from './RepostOfRepostNotificationAction'; +import { + RepostOfRepostNotificationActionFromJSON, + RepostOfRepostNotificationActionFromJSONTyped, + RepostOfRepostNotificationActionToJSON, +} from './RepostOfRepostNotificationAction'; + +/** + * + * @export + * @interface RepostOfRepostNotification + */ +export interface RepostOfRepostNotification { + /** + * + * @type {string} + * @memberof RepostOfRepostNotification + */ + type: string; + /** + * + * @type {string} + * @memberof RepostOfRepostNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof RepostOfRepostNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof RepostOfRepostNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof RepostOfRepostNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the RepostOfRepostNotification interface. + */ +export function instanceOfRepostOfRepostNotification(value: object): value is RepostOfRepostNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function RepostOfRepostNotificationFromJSON(json: any): RepostOfRepostNotification { + return RepostOfRepostNotificationFromJSONTyped(json, false); +} + +export function RepostOfRepostNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepostOfRepostNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(RepostOfRepostNotificationActionFromJSON)), + }; +} + +export function RepostOfRepostNotificationToJSON(value?: RepostOfRepostNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(RepostOfRepostNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationAction.ts new file mode 100644 index 00000000000..a88db90ae93 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RepostOfRepostNotificationActionData } from './RepostOfRepostNotificationActionData'; +import { + RepostOfRepostNotificationActionDataFromJSON, + RepostOfRepostNotificationActionDataFromJSONTyped, + RepostOfRepostNotificationActionDataToJSON, +} from './RepostOfRepostNotificationActionData'; + +/** + * + * @export + * @interface RepostOfRepostNotificationAction + */ +export interface RepostOfRepostNotificationAction { + /** + * + * @type {string} + * @memberof RepostOfRepostNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof RepostOfRepostNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof RepostOfRepostNotificationAction + */ + timestamp: number; + /** + * + * @type {RepostOfRepostNotificationActionData} + * @memberof RepostOfRepostNotificationAction + */ + data: RepostOfRepostNotificationActionData; +} + +/** + * Check if a given object implements the RepostOfRepostNotificationAction interface. + */ +export function instanceOfRepostOfRepostNotificationAction(value: object): value is RepostOfRepostNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function RepostOfRepostNotificationActionFromJSON(json: any): RepostOfRepostNotificationAction { + return RepostOfRepostNotificationActionFromJSONTyped(json, false); +} + +export function RepostOfRepostNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepostOfRepostNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': RepostOfRepostNotificationActionDataFromJSON(json['data']), + }; +} + +export function RepostOfRepostNotificationActionToJSON(value?: RepostOfRepostNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': RepostOfRepostNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationActionData.ts new file mode 100644 index 00000000000..7b943ddc6a3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RepostOfRepostNotificationActionData.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RepostOfRepostNotificationActionData + */ +export interface RepostOfRepostNotificationActionData { + /** + * + * @type {string} + * @memberof RepostOfRepostNotificationActionData + */ + type: RepostOfRepostNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof RepostOfRepostNotificationActionData + */ + userId: string; + /** + * + * @type {string} + * @memberof RepostOfRepostNotificationActionData + */ + repostOfRepostItemId: string; +} + + +/** + * @export + */ +export const RepostOfRepostNotificationActionDataTypeEnum = { + Track: 'track', + Playlist: 'playlist', + Album: 'album' +} as const; +export type RepostOfRepostNotificationActionDataTypeEnum = typeof RepostOfRepostNotificationActionDataTypeEnum[keyof typeof RepostOfRepostNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the RepostOfRepostNotificationActionData interface. + */ +export function instanceOfRepostOfRepostNotificationActionData(value: object): value is RepostOfRepostNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "repostOfRepostItemId" in value && value["repostOfRepostItemId"] !== undefined; + + return isInstance; +} + +export function RepostOfRepostNotificationActionDataFromJSON(json: any): RepostOfRepostNotificationActionData { + return RepostOfRepostNotificationActionDataFromJSONTyped(json, false); +} + +export function RepostOfRepostNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepostOfRepostNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'userId': json['user_id'], + 'repostOfRepostItemId': json['repost_of_repost_item_id'], + }; +} + +export function RepostOfRepostNotificationActionDataToJSON(value?: RepostOfRepostNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'user_id': value.userId, + 'repost_of_repost_item_id': value.repostOfRepostItemId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotification.ts new file mode 100644 index 00000000000..7ac2f636377 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RequestManagerNotificationAction } from './RequestManagerNotificationAction'; +import { + RequestManagerNotificationActionFromJSON, + RequestManagerNotificationActionFromJSONTyped, + RequestManagerNotificationActionToJSON, +} from './RequestManagerNotificationAction'; + +/** + * + * @export + * @interface RequestManagerNotification + */ +export interface RequestManagerNotification { + /** + * + * @type {string} + * @memberof RequestManagerNotification + */ + type: string; + /** + * + * @type {string} + * @memberof RequestManagerNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof RequestManagerNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof RequestManagerNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof RequestManagerNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the RequestManagerNotification interface. + */ +export function instanceOfRequestManagerNotification(value: object): value is RequestManagerNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function RequestManagerNotificationFromJSON(json: any): RequestManagerNotification { + return RequestManagerNotificationFromJSONTyped(json, false); +} + +export function RequestManagerNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): RequestManagerNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(RequestManagerNotificationActionFromJSON)), + }; +} + +export function RequestManagerNotificationToJSON(value?: RequestManagerNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(RequestManagerNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationAction.ts new file mode 100644 index 00000000000..834f7fd217d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RequestManagerNotificationActionData } from './RequestManagerNotificationActionData'; +import { + RequestManagerNotificationActionDataFromJSON, + RequestManagerNotificationActionDataFromJSONTyped, + RequestManagerNotificationActionDataToJSON, +} from './RequestManagerNotificationActionData'; + +/** + * + * @export + * @interface RequestManagerNotificationAction + */ +export interface RequestManagerNotificationAction { + /** + * + * @type {string} + * @memberof RequestManagerNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof RequestManagerNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof RequestManagerNotificationAction + */ + timestamp: number; + /** + * + * @type {RequestManagerNotificationActionData} + * @memberof RequestManagerNotificationAction + */ + data: RequestManagerNotificationActionData; +} + +/** + * Check if a given object implements the RequestManagerNotificationAction interface. + */ +export function instanceOfRequestManagerNotificationAction(value: object): value is RequestManagerNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function RequestManagerNotificationActionFromJSON(json: any): RequestManagerNotificationAction { + return RequestManagerNotificationActionFromJSONTyped(json, false); +} + +export function RequestManagerNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RequestManagerNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': RequestManagerNotificationActionDataFromJSON(json['data']), + }; +} + +export function RequestManagerNotificationActionToJSON(value?: RequestManagerNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': RequestManagerNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationActionData.ts new file mode 100644 index 00000000000..67f3f892e60 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RequestManagerNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RequestManagerNotificationActionData + */ +export interface RequestManagerNotificationActionData { + /** + * + * @type {string} + * @memberof RequestManagerNotificationActionData + */ + userId: string; + /** + * + * @type {string} + * @memberof RequestManagerNotificationActionData + */ + granteeUserId: string; + /** + * + * @type {string} + * @memberof RequestManagerNotificationActionData + */ + granteeAddress: string; +} + +/** + * Check if a given object implements the RequestManagerNotificationActionData interface. + */ +export function instanceOfRequestManagerNotificationActionData(value: object): value is RequestManagerNotificationActionData { + let isInstance = true; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "granteeUserId" in value && value["granteeUserId"] !== undefined; + isInstance = isInstance && "granteeAddress" in value && value["granteeAddress"] !== undefined; + + return isInstance; +} + +export function RequestManagerNotificationActionDataFromJSON(json: any): RequestManagerNotificationActionData { + return RequestManagerNotificationActionDataFromJSONTyped(json, false); +} + +export function RequestManagerNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RequestManagerNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': json['user_id'], + 'granteeUserId': json['grantee_user_id'], + 'granteeAddress': json['grantee_address'], + }; +} + +export function RequestManagerNotificationActionDataToJSON(value?: RequestManagerNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user_id': value.userId, + 'grantee_user_id': value.granteeUserId, + 'grantee_address': value.granteeAddress, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SaveNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/SaveNotification.ts new file mode 100644 index 00000000000..697da9aedcf --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SaveNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SaveNotificationAction } from './SaveNotificationAction'; +import { + SaveNotificationActionFromJSON, + SaveNotificationActionFromJSONTyped, + SaveNotificationActionToJSON, +} from './SaveNotificationAction'; + +/** + * + * @export + * @interface SaveNotification + */ +export interface SaveNotification { + /** + * + * @type {string} + * @memberof SaveNotification + */ + type: string; + /** + * + * @type {string} + * @memberof SaveNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof SaveNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof SaveNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof SaveNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the SaveNotification interface. + */ +export function instanceOfSaveNotification(value: object): value is SaveNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function SaveNotificationFromJSON(json: any): SaveNotification { + return SaveNotificationFromJSONTyped(json, false); +} + +export function SaveNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(SaveNotificationActionFromJSON)), + }; +} + +export function SaveNotificationToJSON(value?: SaveNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(SaveNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SaveNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/SaveNotificationAction.ts new file mode 100644 index 00000000000..24b22f085ef --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SaveNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SaveNotificationActionData } from './SaveNotificationActionData'; +import { + SaveNotificationActionDataFromJSON, + SaveNotificationActionDataFromJSONTyped, + SaveNotificationActionDataToJSON, +} from './SaveNotificationActionData'; + +/** + * + * @export + * @interface SaveNotificationAction + */ +export interface SaveNotificationAction { + /** + * + * @type {string} + * @memberof SaveNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof SaveNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof SaveNotificationAction + */ + timestamp: number; + /** + * + * @type {SaveNotificationActionData} + * @memberof SaveNotificationAction + */ + data: SaveNotificationActionData; +} + +/** + * Check if a given object implements the SaveNotificationAction interface. + */ +export function instanceOfSaveNotificationAction(value: object): value is SaveNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function SaveNotificationActionFromJSON(json: any): SaveNotificationAction { + return SaveNotificationActionFromJSONTyped(json, false); +} + +export function SaveNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': SaveNotificationActionDataFromJSON(json['data']), + }; +} + +export function SaveNotificationActionToJSON(value?: SaveNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': SaveNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SaveNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/SaveNotificationActionData.ts new file mode 100644 index 00000000000..6fecd44640a --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SaveNotificationActionData.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SaveNotificationActionData + */ +export interface SaveNotificationActionData { + /** + * + * @type {string} + * @memberof SaveNotificationActionData + */ + type: SaveNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof SaveNotificationActionData + */ + userId: string; + /** + * + * @type {string} + * @memberof SaveNotificationActionData + */ + saveItemId: string; +} + + +/** + * @export + */ +export const SaveNotificationActionDataTypeEnum = { + Track: 'track', + Playlist: 'playlist', + Album: 'album' +} as const; +export type SaveNotificationActionDataTypeEnum = typeof SaveNotificationActionDataTypeEnum[keyof typeof SaveNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the SaveNotificationActionData interface. + */ +export function instanceOfSaveNotificationActionData(value: object): value is SaveNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "saveItemId" in value && value["saveItemId"] !== undefined; + + return isInstance; +} + +export function SaveNotificationActionDataFromJSON(json: any): SaveNotificationActionData { + return SaveNotificationActionDataFromJSONTyped(json, false); +} + +export function SaveNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'userId': json['user_id'], + 'saveItemId': json['save_item_id'], + }; +} + +export function SaveNotificationActionDataToJSON(value?: SaveNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'user_id': value.userId, + 'save_item_id': value.saveItemId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotification.ts new file mode 100644 index 00000000000..d216f9f7998 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SaveOfRepostNotificationAction } from './SaveOfRepostNotificationAction'; +import { + SaveOfRepostNotificationActionFromJSON, + SaveOfRepostNotificationActionFromJSONTyped, + SaveOfRepostNotificationActionToJSON, +} from './SaveOfRepostNotificationAction'; + +/** + * + * @export + * @interface SaveOfRepostNotification + */ +export interface SaveOfRepostNotification { + /** + * + * @type {string} + * @memberof SaveOfRepostNotification + */ + type: string; + /** + * + * @type {string} + * @memberof SaveOfRepostNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof SaveOfRepostNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof SaveOfRepostNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof SaveOfRepostNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the SaveOfRepostNotification interface. + */ +export function instanceOfSaveOfRepostNotification(value: object): value is SaveOfRepostNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function SaveOfRepostNotificationFromJSON(json: any): SaveOfRepostNotification { + return SaveOfRepostNotificationFromJSONTyped(json, false); +} + +export function SaveOfRepostNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveOfRepostNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(SaveOfRepostNotificationActionFromJSON)), + }; +} + +export function SaveOfRepostNotificationToJSON(value?: SaveOfRepostNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(SaveOfRepostNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationAction.ts new file mode 100644 index 00000000000..9fbf155ddd4 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SaveOfRepostNotificationActionData } from './SaveOfRepostNotificationActionData'; +import { + SaveOfRepostNotificationActionDataFromJSON, + SaveOfRepostNotificationActionDataFromJSONTyped, + SaveOfRepostNotificationActionDataToJSON, +} from './SaveOfRepostNotificationActionData'; + +/** + * + * @export + * @interface SaveOfRepostNotificationAction + */ +export interface SaveOfRepostNotificationAction { + /** + * + * @type {string} + * @memberof SaveOfRepostNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof SaveOfRepostNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof SaveOfRepostNotificationAction + */ + timestamp: number; + /** + * + * @type {SaveOfRepostNotificationActionData} + * @memberof SaveOfRepostNotificationAction + */ + data: SaveOfRepostNotificationActionData; +} + +/** + * Check if a given object implements the SaveOfRepostNotificationAction interface. + */ +export function instanceOfSaveOfRepostNotificationAction(value: object): value is SaveOfRepostNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function SaveOfRepostNotificationActionFromJSON(json: any): SaveOfRepostNotificationAction { + return SaveOfRepostNotificationActionFromJSONTyped(json, false); +} + +export function SaveOfRepostNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveOfRepostNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': SaveOfRepostNotificationActionDataFromJSON(json['data']), + }; +} + +export function SaveOfRepostNotificationActionToJSON(value?: SaveOfRepostNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': SaveOfRepostNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationActionData.ts new file mode 100644 index 00000000000..1a91957326c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SaveOfRepostNotificationActionData.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SaveOfRepostNotificationActionData + */ +export interface SaveOfRepostNotificationActionData { + /** + * + * @type {string} + * @memberof SaveOfRepostNotificationActionData + */ + type: SaveOfRepostNotificationActionDataTypeEnum; + /** + * + * @type {string} + * @memberof SaveOfRepostNotificationActionData + */ + userId: string; + /** + * + * @type {string} + * @memberof SaveOfRepostNotificationActionData + */ + saveOfRepostItemId: string; +} + + +/** + * @export + */ +export const SaveOfRepostNotificationActionDataTypeEnum = { + Track: 'track', + Playlist: 'playlist', + Album: 'album' +} as const; +export type SaveOfRepostNotificationActionDataTypeEnum = typeof SaveOfRepostNotificationActionDataTypeEnum[keyof typeof SaveOfRepostNotificationActionDataTypeEnum]; + + +/** + * Check if a given object implements the SaveOfRepostNotificationActionData interface. + */ +export function instanceOfSaveOfRepostNotificationActionData(value: object): value is SaveOfRepostNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "saveOfRepostItemId" in value && value["saveOfRepostItemId"] !== undefined; + + return isInstance; +} + +export function SaveOfRepostNotificationActionDataFromJSON(json: any): SaveOfRepostNotificationActionData { + return SaveOfRepostNotificationActionDataFromJSONTyped(json, false); +} + +export function SaveOfRepostNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveOfRepostNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'userId': json['user_id'], + 'saveOfRepostItemId': json['save_of_repost_item_id'], + }; +} + +export function SaveOfRepostNotificationActionDataToJSON(value?: SaveOfRepostNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'user_id': value.userId, + 'save_of_repost_item_id': value.saveOfRepostItemId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SearchAutocompleteResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchAutocompleteResponse.ts new file mode 100644 index 00000000000..920d535dd05 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchAutocompleteResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SearchModel } from './SearchModel'; +import { + SearchModelFromJSON, + SearchModelFromJSONTyped, + SearchModelToJSON, +} from './SearchModel'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface SearchAutocompleteResponse + */ +export interface SearchAutocompleteResponse { + /** + * + * @type {number} + * @memberof SearchAutocompleteResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof SearchAutocompleteResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof SearchAutocompleteResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof SearchAutocompleteResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof SearchAutocompleteResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof SearchAutocompleteResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof SearchAutocompleteResponse + */ + version: VersionMetadata; + /** + * + * @type {SearchModel} + * @memberof SearchAutocompleteResponse + */ + data?: SearchModel; +} + +/** + * Check if a given object implements the SearchAutocompleteResponse interface. + */ +export function instanceOfSearchAutocompleteResponse(value: object): value is SearchAutocompleteResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function SearchAutocompleteResponseFromJSON(json: any): SearchAutocompleteResponse { + return SearchAutocompleteResponseFromJSONTyped(json, false); +} + +export function SearchAutocompleteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchAutocompleteResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : SearchModelFromJSON(json['data']), + }; +} + +export function SearchAutocompleteResponseToJSON(value?: SearchAutocompleteResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': SearchModelToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SearchFullResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchFullResponse.ts new file mode 100644 index 00000000000..9f0ab734393 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchFullResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SearchModel } from './SearchModel'; +import { + SearchModelFromJSON, + SearchModelFromJSONTyped, + SearchModelToJSON, +} from './SearchModel'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface SearchFullResponse + */ +export interface SearchFullResponse { + /** + * + * @type {number} + * @memberof SearchFullResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof SearchFullResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof SearchFullResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof SearchFullResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof SearchFullResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof SearchFullResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof SearchFullResponse + */ + version: VersionMetadata; + /** + * + * @type {SearchModel} + * @memberof SearchFullResponse + */ + data?: SearchModel; +} + +/** + * Check if a given object implements the SearchFullResponse interface. + */ +export function instanceOfSearchFullResponse(value: object): value is SearchFullResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function SearchFullResponseFromJSON(json: any): SearchFullResponse { + return SearchFullResponseFromJSONTyped(json, false); +} + +export function SearchFullResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchFullResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : SearchModelFromJSON(json['data']), + }; +} + +export function SearchFullResponseToJSON(value?: SearchFullResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': SearchModelToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SearchModel.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchModel.ts new file mode 100644 index 00000000000..c7a1264ebc5 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchModel.ts @@ -0,0 +1,145 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SearchPlaylistFull } from './SearchPlaylistFull'; +import { + SearchPlaylistFullFromJSON, + SearchPlaylistFullFromJSONTyped, + SearchPlaylistFullToJSON, +} from './SearchPlaylistFull'; +import type { SearchTrackFull } from './SearchTrackFull'; +import { + SearchTrackFullFromJSON, + SearchTrackFullFromJSONTyped, + SearchTrackFullToJSON, +} from './SearchTrackFull'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface SearchModel + */ +export interface SearchModel { + /** + * + * @type {Array} + * @memberof SearchModel + */ + users: Array; + /** + * + * @type {Array} + * @memberof SearchModel + */ + followedUsers?: Array; + /** + * + * @type {Array} + * @memberof SearchModel + */ + tracks: Array; + /** + * + * @type {Array} + * @memberof SearchModel + */ + savedTracks?: Array; + /** + * + * @type {Array} + * @memberof SearchModel + */ + playlists: Array; + /** + * + * @type {Array} + * @memberof SearchModel + */ + savedPlaylists?: Array; + /** + * + * @type {Array} + * @memberof SearchModel + */ + albums: Array; + /** + * + * @type {Array} + * @memberof SearchModel + */ + savedAlbums?: Array; +} + +/** + * Check if a given object implements the SearchModel interface. + */ +export function instanceOfSearchModel(value: object): value is SearchModel { + let isInstance = true; + isInstance = isInstance && "users" in value && value["users"] !== undefined; + isInstance = isInstance && "tracks" in value && value["tracks"] !== undefined; + isInstance = isInstance && "playlists" in value && value["playlists"] !== undefined; + isInstance = isInstance && "albums" in value && value["albums"] !== undefined; + + return isInstance; +} + +export function SearchModelFromJSON(json: any): SearchModel { + return SearchModelFromJSONTyped(json, false); +} + +export function SearchModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchModel { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'users': ((json['users'] as Array).map(UserFullFromJSON)), + 'followedUsers': !exists(json, 'followed_users') ? undefined : ((json['followed_users'] as Array).map(UserFullFromJSON)), + 'tracks': ((json['tracks'] as Array).map(SearchTrackFullFromJSON)), + 'savedTracks': !exists(json, 'saved_tracks') ? undefined : ((json['saved_tracks'] as Array).map(SearchTrackFullFromJSON)), + 'playlists': ((json['playlists'] as Array).map(SearchPlaylistFullFromJSON)), + 'savedPlaylists': !exists(json, 'saved_playlists') ? undefined : ((json['saved_playlists'] as Array).map(SearchPlaylistFullFromJSON)), + 'albums': ((json['albums'] as Array).map(SearchPlaylistFullFromJSON)), + 'savedAlbums': !exists(json, 'saved_albums') ? undefined : ((json['saved_albums'] as Array).map(SearchPlaylistFullFromJSON)), + }; +} + +export function SearchModelToJSON(value?: SearchModel | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'users': ((value.users as Array).map(UserFullToJSON)), + 'followed_users': value.followedUsers === undefined ? undefined : ((value.followedUsers as Array).map(UserFullToJSON)), + 'tracks': ((value.tracks as Array).map(SearchTrackFullToJSON)), + 'saved_tracks': value.savedTracks === undefined ? undefined : ((value.savedTracks as Array).map(SearchTrackFullToJSON)), + 'playlists': ((value.playlists as Array).map(SearchPlaylistFullToJSON)), + 'saved_playlists': value.savedPlaylists === undefined ? undefined : ((value.savedPlaylists as Array).map(SearchPlaylistFullToJSON)), + 'albums': ((value.albums as Array).map(SearchPlaylistFullToJSON)), + 'saved_albums': value.savedAlbums === undefined ? undefined : ((value.savedAlbums as Array).map(SearchPlaylistFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylistFull.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylistFull.ts new file mode 100644 index 00000000000..f343dc06c70 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylistFull.ts @@ -0,0 +1,456 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { PlaylistAddedTimestamp } from './PlaylistAddedTimestamp'; +import { + PlaylistAddedTimestampFromJSON, + PlaylistAddedTimestampFromJSONTyped, + PlaylistAddedTimestampToJSON, +} from './PlaylistAddedTimestamp'; +import type { PlaylistArtwork } from './PlaylistArtwork'; +import { + PlaylistArtworkFromJSON, + PlaylistArtworkFromJSONTyped, + PlaylistArtworkToJSON, +} from './PlaylistArtwork'; +import type { PlaylistArtworkFull } from './PlaylistArtworkFull'; +import { + PlaylistArtworkFullFromJSON, + PlaylistArtworkFullFromJSONTyped, + PlaylistArtworkFullToJSON, +} from './PlaylistArtworkFull'; +import type { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { TrackFull } from './TrackFull'; +import { + TrackFullFromJSON, + TrackFullFromJSONTyped, + TrackFullToJSON, +} from './TrackFull'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface SearchPlaylistFull + */ +export interface SearchPlaylistFull { + /** + * + * @type {PlaylistArtworkFull} + * @memberof SearchPlaylistFull + */ + artwork?: PlaylistArtworkFull; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + description?: string; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + permalink: string; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + id: string; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + totalPlayCount: number; + /** + * + * @type {UserFull} + * @memberof SearchPlaylistFull + */ + user: UserFull; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof SearchPlaylistFull + */ + access: Access; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + upc?: string; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + trackCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + followeeReposts?: Array; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + followeeFavorites?: Array; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof SearchPlaylistFull + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + userId: string; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof SearchPlaylistFull + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof SearchPlaylistFull + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof SearchPlaylistFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + artists?: Array; + /** + * + * @type {object} + * @memberof SearchPlaylistFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof SearchPlaylistFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + parentalWarningType?: string; +} + +/** + * Check if a given object implements the SearchPlaylistFull interface. + */ +export function instanceOfSearchPlaylistFull(value: object): value is SearchPlaylistFull { + let isInstance = true; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "isImageAutogenerated" in value && value["isImageAutogenerated"] !== undefined; + isInstance = isInstance && "playlistName" in value && value["playlistName"] !== undefined; + isInstance = isInstance && "playlistContents" in value && value["playlistContents"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "totalPlayCount" in value && value["totalPlayCount"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isPrivate" in value && value["isPrivate"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "addedTimestamps" in value && value["addedTimestamps"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + + return isInstance; +} + +export function SearchPlaylistFullFromJSON(json: any): SearchPlaylistFull { + return SearchPlaylistFullFromJSONTyped(json, false); +} + +export function SearchPlaylistFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchPlaylistFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : PlaylistArtworkFullFromJSON(json['artwork']), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'permalink': json['permalink'], + 'id': json['id'], + 'isAlbum': json['is_album'], + 'isImageAutogenerated': json['is_image_autogenerated'], + 'playlistName': json['playlist_name'], + 'playlistContents': ((json['playlist_contents'] as Array).map(PlaylistAddedTimestampFromJSON)), + 'repostCount': json['repost_count'], + 'favoriteCount': json['favorite_count'], + 'totalPlayCount': json['total_play_count'], + 'user': UserFullFromJSON(json['user']), + 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], + 'access': AccessFromJSON(json['access']), + 'upc': !exists(json, 'upc') ? undefined : json['upc'], + 'trackCount': json['track_count'], + 'blocknumber': json['blocknumber'], + 'createdAt': json['created_at'], + 'followeeReposts': !exists(json, 'followee_reposts') ? undefined : ((json['followee_reposts'] as Array).map(RepostFromJSON)), + 'followeeFavorites': !exists(json, 'followee_favorites') ? undefined : ((json['followee_favorites'] as Array).map(FavoriteFromJSON)), + 'hasCurrentUserReposted': json['has_current_user_reposted'], + 'hasCurrentUserSaved': json['has_current_user_saved'], + 'isDelete': json['is_delete'], + 'isPrivate': json['is_private'], + 'updatedAt': json['updated_at'], + 'addedTimestamps': ((json['added_timestamps'] as Array).map(PlaylistAddedTimestampFromJSON)), + 'userId': json['user_id'], + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(TrackFullFromJSON)), + 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], + 'coverArtSizes': !exists(json, 'cover_art_sizes') ? undefined : json['cover_art_sizes'], + 'coverArtCids': !exists(json, 'cover_art_cids') ? undefined : PlaylistArtworkFromJSON(json['cover_art_cids']), + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isScheduledRelease': json['is_scheduled_release'], + 'releaseDate': !exists(json, 'release_date') ? undefined : json['release_date'], + 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], + 'artists': !exists(json, 'artists') ? undefined : json['artists'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + }; +} + +export function SearchPlaylistFullToJSON(value?: SearchPlaylistFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': PlaylistArtworkFullToJSON(value.artwork), + 'description': value.description, + 'permalink': value.permalink, + 'id': value.id, + 'is_album': value.isAlbum, + 'is_image_autogenerated': value.isImageAutogenerated, + 'playlist_name': value.playlistName, + 'playlist_contents': ((value.playlistContents as Array).map(PlaylistAddedTimestampToJSON)), + 'repost_count': value.repostCount, + 'favorite_count': value.favoriteCount, + 'total_play_count': value.totalPlayCount, + 'user': UserFullToJSON(value.user), + 'ddex_app': value.ddexApp, + 'access': AccessToJSON(value.access), + 'upc': value.upc, + 'track_count': value.trackCount, + 'blocknumber': value.blocknumber, + 'created_at': value.createdAt, + 'followee_reposts': value.followeeReposts === undefined ? undefined : ((value.followeeReposts as Array).map(RepostToJSON)), + 'followee_favorites': value.followeeFavorites === undefined ? undefined : ((value.followeeFavorites as Array).map(FavoriteToJSON)), + 'has_current_user_reposted': value.hasCurrentUserReposted, + 'has_current_user_saved': value.hasCurrentUserSaved, + 'is_delete': value.isDelete, + 'is_private': value.isPrivate, + 'updated_at': value.updatedAt, + 'added_timestamps': ((value.addedTimestamps as Array).map(PlaylistAddedTimestampToJSON)), + 'user_id': value.userId, + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(TrackFullToJSON)), + 'cover_art': value.coverArt, + 'cover_art_sizes': value.coverArtSizes, + 'cover_art_cids': PlaylistArtworkToJSON(value.coverArtCids), + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_scheduled_release': value.isScheduledRelease, + 'release_date': value.releaseDate, + 'ddex_release_ids': value.ddexReleaseIds, + 'artists': value.artists, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SearchTrackFull.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchTrackFull.ts new file mode 100644 index 00000000000..a80e0ea656b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchTrackFull.ts @@ -0,0 +1,812 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { AlbumBacklink } from './AlbumBacklink'; +import { + AlbumBacklinkFromJSON, + AlbumBacklinkFromJSONTyped, + AlbumBacklinkToJSON, +} from './AlbumBacklink'; +import type { CoverArt } from './CoverArt'; +import { + CoverArtFromJSON, + CoverArtFromJSONTyped, + CoverArtToJSON, +} from './CoverArt'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; +import type { FullRemixParent } from './FullRemixParent'; +import { + FullRemixParentFromJSON, + FullRemixParentFromJSONTyped, + FullRemixParentToJSON, +} from './FullRemixParent'; +import type { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { StemParent } from './StemParent'; +import { + StemParentFromJSON, + StemParentFromJSONTyped, + StemParentToJSON, +} from './StemParent'; +import type { TrackArtworkFull } from './TrackArtworkFull'; +import { + TrackArtworkFullFromJSON, + TrackArtworkFullFromJSONTyped, + TrackArtworkFullToJSON, +} from './TrackArtworkFull'; +import type { TrackSegment } from './TrackSegment'; +import { + TrackSegmentFromJSON, + TrackSegmentFromJSONTyped, + TrackSegmentToJSON, +} from './TrackSegment'; +import type { UrlWithMirrors } from './UrlWithMirrors'; +import { + UrlWithMirrorsFromJSON, + UrlWithMirrorsFromJSONTyped, + UrlWithMirrorsToJSON, +} from './UrlWithMirrors'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface SearchTrackFull + */ +export interface SearchTrackFull { + /** + * + * @type {TrackArtworkFull} + * @memberof SearchTrackFull + */ + artwork: TrackArtworkFull; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + description?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + genre: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + id: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + trackCid?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + previewCid?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + origFileCid?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + origFilename?: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isOriginalAvailable: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + mood?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + releaseDate?: string; + /** + * + * @type {FullRemixParent} + * @memberof SearchTrackFull + */ + remixOf: FullRemixParent; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + commentCount: number; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + tags?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + title: string; + /** + * + * @type {UserFull} + * @memberof SearchTrackFull + */ + user: UserFull; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + duration: number; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isDownloadable: boolean; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + playCount: number; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + permalink: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isStreamable?: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + ddexApp?: string; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + playlistsContainingTrack?: Array; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + pinnedCommentId?: number; + /** + * + * @type {AlbumBacklink} + * @memberof SearchTrackFull + */ + albumBacklink?: AlbumBacklink; + /** + * Describes what access the given user has + * @type {Access} + * @memberof SearchTrackFull + */ + access: Access; + /** + * The blocknumber this track was last updated + * @type {number} + * @memberof SearchTrackFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + createDate?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverArtSizes: string; + /** + * + * @type {CoverArt} + * @memberof SearchTrackFull + */ + coverArtCids?: CoverArt; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + createdAt: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + creditsSplits?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + isrc?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + license?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + iswc?: string; + /** + * + * @type {FieldVisibility} + * @memberof SearchTrackFull + */ + fieldVisibility: FieldVisibility; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + followeeReposts?: Array; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isScheduledRelease: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isUnlisted: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + followeeFavorites?: Array; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + routeId: string; + /** + * + * @type {StemParent} + * @memberof SearchTrackFull + */ + stemOf?: StemParent; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + trackSegments: Array; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + userId: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isDelete: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverArt?: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isAvailable: boolean; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + aiAttributionUserId?: number; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + allowedApiKeys?: Array; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + audioUploadId?: string; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + previewStartSeconds?: number; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + bpm?: number; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isCustomBpm?: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + musicalKey?: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isCustomMusicalKey?: boolean; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + audioAnalysisErrorCount?: number; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + commentsDisabled?: boolean; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + artists?: Array; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + resourceContributors?: Array; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + indirectResourceContributors?: Array; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + rightsController?: object; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + parentalWarningType?: string; + /** + * Whether or not the owner has restricted streaming behind an access gate + * @type {boolean} + * @memberof SearchTrackFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof SearchTrackFull + */ + streamConditions?: AccessGate; + /** + * Whether or not the owner has restricted downloading behind an access gate + * @type {boolean} + * @memberof SearchTrackFull + */ + isDownloadGated: boolean; + /** + * How to unlock the track download + * @type {AccessGate} + * @memberof SearchTrackFull + */ + downloadConditions?: AccessGate; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverOriginalSongTitle?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverOriginalArtist?: string; + /** + * Indicates whether the track is owned by the user for MRI sake + * @type {boolean} + * @memberof SearchTrackFull + */ + isOwnedByUser: boolean; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrackFull + */ + stream: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrackFull + */ + download: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrackFull + */ + preview: UrlWithMirrors; +} + +/** + * Check if a given object implements the SearchTrackFull interface. + */ +export function instanceOfSearchTrackFull(value: object): value is SearchTrackFull { + let isInstance = true; + isInstance = isInstance && "artwork" in value && value["artwork"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isOriginalAvailable" in value && value["isOriginalAvailable"] !== undefined; + isInstance = isInstance && "remixOf" in value && value["remixOf"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "commentCount" in value && value["commentCount"] !== undefined; + isInstance = isInstance && "title" in value && value["title"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "duration" in value && value["duration"] !== undefined; + isInstance = isInstance && "isDownloadable" in value && value["isDownloadable"] !== undefined; + isInstance = isInstance && "playCount" in value && value["playCount"] !== undefined; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "coverArtSizes" in value && value["coverArtSizes"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "fieldVisibility" in value && value["fieldVisibility"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + isInstance = isInstance && "isUnlisted" in value && value["isUnlisted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "routeId" in value && value["routeId"] !== undefined; + isInstance = isInstance && "trackSegments" in value && value["trackSegments"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isAvailable" in value && value["isAvailable"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isDownloadGated" in value && value["isDownloadGated"] !== undefined; + isInstance = isInstance && "isOwnedByUser" in value && value["isOwnedByUser"] !== undefined; + isInstance = isInstance && "stream" in value && value["stream"] !== undefined; + isInstance = isInstance && "download" in value && value["download"] !== undefined; + isInstance = isInstance && "preview" in value && value["preview"] !== undefined; + + return isInstance; +} + +export function SearchTrackFullFromJSON(json: any): SearchTrackFull { + return SearchTrackFullFromJSONTyped(json, false); +} + +export function SearchTrackFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchTrackFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': TrackArtworkFullFromJSON(json['artwork']), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'genre': json['genre'], + 'id': json['id'], + 'trackCid': !exists(json, 'track_cid') ? undefined : json['track_cid'], + 'previewCid': !exists(json, 'preview_cid') ? undefined : json['preview_cid'], + 'origFileCid': !exists(json, 'orig_file_cid') ? undefined : json['orig_file_cid'], + 'origFilename': !exists(json, 'orig_filename') ? undefined : json['orig_filename'], + 'isOriginalAvailable': json['is_original_available'], + 'mood': !exists(json, 'mood') ? undefined : json['mood'], + 'releaseDate': !exists(json, 'release_date') ? undefined : json['release_date'], + 'remixOf': FullRemixParentFromJSON(json['remix_of']), + 'repostCount': json['repost_count'], + 'favoriteCount': json['favorite_count'], + 'commentCount': json['comment_count'], + 'tags': !exists(json, 'tags') ? undefined : json['tags'], + 'title': json['title'], + 'user': UserFullFromJSON(json['user']), + 'duration': json['duration'], + 'isDownloadable': json['is_downloadable'], + 'playCount': json['play_count'], + 'permalink': json['permalink'], + 'isStreamable': !exists(json, 'is_streamable') ? undefined : json['is_streamable'], + 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], + 'playlistsContainingTrack': !exists(json, 'playlists_containing_track') ? undefined : json['playlists_containing_track'], + 'pinnedCommentId': !exists(json, 'pinned_comment_id') ? undefined : json['pinned_comment_id'], + 'albumBacklink': !exists(json, 'album_backlink') ? undefined : AlbumBacklinkFromJSON(json['album_backlink']), + 'access': AccessFromJSON(json['access']), + 'blocknumber': json['blocknumber'], + 'createDate': !exists(json, 'create_date') ? undefined : json['create_date'], + 'coverArtSizes': json['cover_art_sizes'], + 'coverArtCids': !exists(json, 'cover_art_cids') ? undefined : CoverArtFromJSON(json['cover_art_cids']), + 'createdAt': json['created_at'], + 'creditsSplits': !exists(json, 'credits_splits') ? undefined : json['credits_splits'], + 'isrc': !exists(json, 'isrc') ? undefined : json['isrc'], + 'license': !exists(json, 'license') ? undefined : json['license'], + 'iswc': !exists(json, 'iswc') ? undefined : json['iswc'], + 'fieldVisibility': FieldVisibilityFromJSON(json['field_visibility']), + 'followeeReposts': !exists(json, 'followee_reposts') ? undefined : ((json['followee_reposts'] as Array).map(RepostFromJSON)), + 'hasCurrentUserReposted': json['has_current_user_reposted'], + 'isScheduledRelease': json['is_scheduled_release'], + 'isUnlisted': json['is_unlisted'], + 'hasCurrentUserSaved': json['has_current_user_saved'], + 'followeeFavorites': !exists(json, 'followee_favorites') ? undefined : ((json['followee_favorites'] as Array).map(FavoriteFromJSON)), + 'routeId': json['route_id'], + 'stemOf': !exists(json, 'stem_of') ? undefined : StemParentFromJSON(json['stem_of']), + 'trackSegments': ((json['track_segments'] as Array).map(TrackSegmentFromJSON)), + 'updatedAt': json['updated_at'], + 'userId': json['user_id'], + 'isDelete': json['is_delete'], + 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], + 'isAvailable': json['is_available'], + 'aiAttributionUserId': !exists(json, 'ai_attribution_user_id') ? undefined : json['ai_attribution_user_id'], + 'allowedApiKeys': !exists(json, 'allowed_api_keys') ? undefined : json['allowed_api_keys'], + 'audioUploadId': !exists(json, 'audio_upload_id') ? undefined : json['audio_upload_id'], + 'previewStartSeconds': !exists(json, 'preview_start_seconds') ? undefined : json['preview_start_seconds'], + 'bpm': !exists(json, 'bpm') ? undefined : json['bpm'], + 'isCustomBpm': !exists(json, 'is_custom_bpm') ? undefined : json['is_custom_bpm'], + 'musicalKey': !exists(json, 'musical_key') ? undefined : json['musical_key'], + 'isCustomMusicalKey': !exists(json, 'is_custom_musical_key') ? undefined : json['is_custom_musical_key'], + 'audioAnalysisErrorCount': !exists(json, 'audio_analysis_error_count') ? undefined : json['audio_analysis_error_count'], + 'commentsDisabled': !exists(json, 'comments_disabled') ? undefined : json['comments_disabled'], + 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], + 'artists': !exists(json, 'artists') ? undefined : json['artists'], + 'resourceContributors': !exists(json, 'resource_contributors') ? undefined : json['resource_contributors'], + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : json['indirect_resource_contributors'], + 'rightsController': !exists(json, 'rights_controller') ? undefined : json['rights_controller'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isDownloadGated': json['is_download_gated'], + 'downloadConditions': !exists(json, 'download_conditions') ? undefined : AccessGateFromJSON(json['download_conditions']), + 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], + 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], + 'isOwnedByUser': json['is_owned_by_user'], + 'stream': UrlWithMirrorsFromJSON(json['stream']), + 'download': UrlWithMirrorsFromJSON(json['download']), + 'preview': UrlWithMirrorsFromJSON(json['preview']), + }; +} + +export function SearchTrackFullToJSON(value?: SearchTrackFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': TrackArtworkFullToJSON(value.artwork), + 'description': value.description, + 'genre': value.genre, + 'id': value.id, + 'track_cid': value.trackCid, + 'preview_cid': value.previewCid, + 'orig_file_cid': value.origFileCid, + 'orig_filename': value.origFilename, + 'is_original_available': value.isOriginalAvailable, + 'mood': value.mood, + 'release_date': value.releaseDate, + 'remix_of': FullRemixParentToJSON(value.remixOf), + 'repost_count': value.repostCount, + 'favorite_count': value.favoriteCount, + 'comment_count': value.commentCount, + 'tags': value.tags, + 'title': value.title, + 'user': UserFullToJSON(value.user), + 'duration': value.duration, + 'is_downloadable': value.isDownloadable, + 'play_count': value.playCount, + 'permalink': value.permalink, + 'is_streamable': value.isStreamable, + 'ddex_app': value.ddexApp, + 'playlists_containing_track': value.playlistsContainingTrack, + 'pinned_comment_id': value.pinnedCommentId, + 'album_backlink': AlbumBacklinkToJSON(value.albumBacklink), + 'access': AccessToJSON(value.access), + 'blocknumber': value.blocknumber, + 'create_date': value.createDate, + 'cover_art_sizes': value.coverArtSizes, + 'cover_art_cids': CoverArtToJSON(value.coverArtCids), + 'created_at': value.createdAt, + 'credits_splits': value.creditsSplits, + 'isrc': value.isrc, + 'license': value.license, + 'iswc': value.iswc, + 'field_visibility': FieldVisibilityToJSON(value.fieldVisibility), + 'followee_reposts': value.followeeReposts === undefined ? undefined : ((value.followeeReposts as Array).map(RepostToJSON)), + 'has_current_user_reposted': value.hasCurrentUserReposted, + 'is_scheduled_release': value.isScheduledRelease, + 'is_unlisted': value.isUnlisted, + 'has_current_user_saved': value.hasCurrentUserSaved, + 'followee_favorites': value.followeeFavorites === undefined ? undefined : ((value.followeeFavorites as Array).map(FavoriteToJSON)), + 'route_id': value.routeId, + 'stem_of': StemParentToJSON(value.stemOf), + 'track_segments': ((value.trackSegments as Array).map(TrackSegmentToJSON)), + 'updated_at': value.updatedAt, + 'user_id': value.userId, + 'is_delete': value.isDelete, + 'cover_art': value.coverArt, + 'is_available': value.isAvailable, + 'ai_attribution_user_id': value.aiAttributionUserId, + 'allowed_api_keys': value.allowedApiKeys, + 'audio_upload_id': value.audioUploadId, + 'preview_start_seconds': value.previewStartSeconds, + 'bpm': value.bpm, + 'is_custom_bpm': value.isCustomBpm, + 'musical_key': value.musicalKey, + 'is_custom_musical_key': value.isCustomMusicalKey, + 'audio_analysis_error_count': value.audioAnalysisErrorCount, + 'comments_disabled': value.commentsDisabled, + 'ddex_release_ids': value.ddexReleaseIds, + 'artists': value.artists, + 'resource_contributors': value.resourceContributors, + 'indirect_resource_contributors': value.indirectResourceContributors, + 'rights_controller': value.rightsController, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_download_gated': value.isDownloadGated, + 'download_conditions': AccessGateToJSON(value.downloadConditions), + 'cover_original_song_title': value.coverOriginalSongTitle, + 'cover_original_artist': value.coverOriginalArtist, + 'is_owned_by_user': value.isOwnedByUser, + 'stream': UrlWithMirrorsToJSON(value.stream), + 'download': UrlWithMirrorsToJSON(value.download), + 'preview': UrlWithMirrorsToJSON(value.preview), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SendTipNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotification.ts new file mode 100644 index 00000000000..ce560d3efd2 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SendTipNotificationAction } from './SendTipNotificationAction'; +import { + SendTipNotificationActionFromJSON, + SendTipNotificationActionFromJSONTyped, + SendTipNotificationActionToJSON, +} from './SendTipNotificationAction'; + +/** + * + * @export + * @interface SendTipNotification + */ +export interface SendTipNotification { + /** + * + * @type {string} + * @memberof SendTipNotification + */ + type: string; + /** + * + * @type {string} + * @memberof SendTipNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof SendTipNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof SendTipNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof SendTipNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the SendTipNotification interface. + */ +export function instanceOfSendTipNotification(value: object): value is SendTipNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function SendTipNotificationFromJSON(json: any): SendTipNotification { + return SendTipNotificationFromJSONTyped(json, false); +} + +export function SendTipNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTipNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(SendTipNotificationActionFromJSON)), + }; +} + +export function SendTipNotificationToJSON(value?: SendTipNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(SendTipNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationAction.ts new file mode 100644 index 00000000000..e7d4797bbf0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SendTipNotificationActionData } from './SendTipNotificationActionData'; +import { + SendTipNotificationActionDataFromJSON, + SendTipNotificationActionDataFromJSONTyped, + SendTipNotificationActionDataToJSON, +} from './SendTipNotificationActionData'; + +/** + * + * @export + * @interface SendTipNotificationAction + */ +export interface SendTipNotificationAction { + /** + * + * @type {string} + * @memberof SendTipNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof SendTipNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof SendTipNotificationAction + */ + timestamp: number; + /** + * + * @type {SendTipNotificationActionData} + * @memberof SendTipNotificationAction + */ + data: SendTipNotificationActionData; +} + +/** + * Check if a given object implements the SendTipNotificationAction interface. + */ +export function instanceOfSendTipNotificationAction(value: object): value is SendTipNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function SendTipNotificationActionFromJSON(json: any): SendTipNotificationAction { + return SendTipNotificationActionFromJSONTyped(json, false); +} + +export function SendTipNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTipNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': SendTipNotificationActionDataFromJSON(json['data']), + }; +} + +export function SendTipNotificationActionToJSON(value?: SendTipNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': SendTipNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationActionData.ts new file mode 100644 index 00000000000..096702d3244 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationActionData.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SendTipNotificationActionData + */ +export interface SendTipNotificationActionData { + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + receiverUserId: string; + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + tipTxSignature: string; +} + +/** + * Check if a given object implements the SendTipNotificationActionData interface. + */ +export function instanceOfSendTipNotificationActionData(value: object): value is SendTipNotificationActionData { + let isInstance = true; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "receiverUserId" in value && value["receiverUserId"] !== undefined; + isInstance = isInstance && "tipTxSignature" in value && value["tipTxSignature"] !== undefined; + + return isInstance; +} + +export function SendTipNotificationActionDataFromJSON(json: any): SendTipNotificationActionData { + return SendTipNotificationActionDataFromJSONTyped(json, false); +} + +export function SendTipNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTipNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'amount': json['amount'], + 'senderUserId': json['sender_user_id'], + 'receiverUserId': json['receiver_user_id'], + 'tipTxSignature': json['tip_tx_signature'], + }; +} + +export function SendTipNotificationActionDataToJSON(value?: SendTipNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'amount': value.amount, + 'sender_user_id': value.senderUserId, + 'receiver_user_id': value.receiverUserId, + 'tip_tx_signature': value.tipTxSignature, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts b/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts new file mode 100644 index 00000000000..826d89b6b26 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface StemParent + */ +export interface StemParent { + /** + * + * @type {string} + * @memberof StemParent + */ + category: string; + /** + * + * @type {number} + * @memberof StemParent + */ + parentTrackId: number; +} + +/** + * Check if a given object implements the StemParent interface. + */ +export function instanceOfStemParent(value: object): value is StemParent { + let isInstance = true; + isInstance = isInstance && "category" in value && value["category"] !== undefined; + isInstance = isInstance && "parentTrackId" in value && value["parentTrackId"] !== undefined; + + return isInstance; +} + +export function StemParentFromJSON(json: any): StemParent { + return StemParentFromJSONTyped(json, false); +} + +export function StemParentFromJSONTyped(json: any, ignoreDiscriminator: boolean): StemParent { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'category': json['category'], + 'parentTrackId': json['parent_track_id'], + }; +} + +export function StemParentToJSON(value?: StemParent | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'category': value.category, + 'parent_track_id': value.parentTrackId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotification.ts new file mode 100644 index 00000000000..5500fd76c3f --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SupporterDethronedNotificationAction } from './SupporterDethronedNotificationAction'; +import { + SupporterDethronedNotificationActionFromJSON, + SupporterDethronedNotificationActionFromJSONTyped, + SupporterDethronedNotificationActionToJSON, +} from './SupporterDethronedNotificationAction'; + +/** + * + * @export + * @interface SupporterDethronedNotification + */ +export interface SupporterDethronedNotification { + /** + * + * @type {string} + * @memberof SupporterDethronedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof SupporterDethronedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof SupporterDethronedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof SupporterDethronedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof SupporterDethronedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the SupporterDethronedNotification interface. + */ +export function instanceOfSupporterDethronedNotification(value: object): value is SupporterDethronedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function SupporterDethronedNotificationFromJSON(json: any): SupporterDethronedNotification { + return SupporterDethronedNotificationFromJSONTyped(json, false); +} + +export function SupporterDethronedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterDethronedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(SupporterDethronedNotificationActionFromJSON)), + }; +} + +export function SupporterDethronedNotificationToJSON(value?: SupporterDethronedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(SupporterDethronedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationAction.ts new file mode 100644 index 00000000000..30bf561d593 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SupporterDethronedNotificationActionData } from './SupporterDethronedNotificationActionData'; +import { + SupporterDethronedNotificationActionDataFromJSON, + SupporterDethronedNotificationActionDataFromJSONTyped, + SupporterDethronedNotificationActionDataToJSON, +} from './SupporterDethronedNotificationActionData'; + +/** + * + * @export + * @interface SupporterDethronedNotificationAction + */ +export interface SupporterDethronedNotificationAction { + /** + * + * @type {string} + * @memberof SupporterDethronedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof SupporterDethronedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof SupporterDethronedNotificationAction + */ + timestamp: number; + /** + * + * @type {SupporterDethronedNotificationActionData} + * @memberof SupporterDethronedNotificationAction + */ + data: SupporterDethronedNotificationActionData; +} + +/** + * Check if a given object implements the SupporterDethronedNotificationAction interface. + */ +export function instanceOfSupporterDethronedNotificationAction(value: object): value is SupporterDethronedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function SupporterDethronedNotificationActionFromJSON(json: any): SupporterDethronedNotificationAction { + return SupporterDethronedNotificationActionFromJSONTyped(json, false); +} + +export function SupporterDethronedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterDethronedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': SupporterDethronedNotificationActionDataFromJSON(json['data']), + }; +} + +export function SupporterDethronedNotificationActionToJSON(value?: SupporterDethronedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': SupporterDethronedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationActionData.ts new file mode 100644 index 00000000000..dce3f0949c4 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SupporterDethronedNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SupporterDethronedNotificationActionData + */ +export interface SupporterDethronedNotificationActionData { + /** + * + * @type {string} + * @memberof SupporterDethronedNotificationActionData + */ + dethronedUserId: string; + /** + * + * @type {string} + * @memberof SupporterDethronedNotificationActionData + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof SupporterDethronedNotificationActionData + */ + receiverUserId: string; +} + +/** + * Check if a given object implements the SupporterDethronedNotificationActionData interface. + */ +export function instanceOfSupporterDethronedNotificationActionData(value: object): value is SupporterDethronedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "dethronedUserId" in value && value["dethronedUserId"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "receiverUserId" in value && value["receiverUserId"] !== undefined; + + return isInstance; +} + +export function SupporterDethronedNotificationActionDataFromJSON(json: any): SupporterDethronedNotificationActionData { + return SupporterDethronedNotificationActionDataFromJSONTyped(json, false); +} + +export function SupporterDethronedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterDethronedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'dethronedUserId': json['dethroned_user_id'], + 'senderUserId': json['sender_user_id'], + 'receiverUserId': json['receiver_user_id'], + }; +} + +export function SupporterDethronedNotificationActionDataToJSON(value?: SupporterDethronedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'dethroned_user_id': value.dethronedUserId, + 'sender_user_id': value.senderUserId, + 'receiver_user_id': value.receiverUserId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotification.ts new file mode 100644 index 00000000000..27955fa88e0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SupporterRankUpNotificationAction } from './SupporterRankUpNotificationAction'; +import { + SupporterRankUpNotificationActionFromJSON, + SupporterRankUpNotificationActionFromJSONTyped, + SupporterRankUpNotificationActionToJSON, +} from './SupporterRankUpNotificationAction'; + +/** + * + * @export + * @interface SupporterRankUpNotification + */ +export interface SupporterRankUpNotification { + /** + * + * @type {string} + * @memberof SupporterRankUpNotification + */ + type: string; + /** + * + * @type {string} + * @memberof SupporterRankUpNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof SupporterRankUpNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof SupporterRankUpNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof SupporterRankUpNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the SupporterRankUpNotification interface. + */ +export function instanceOfSupporterRankUpNotification(value: object): value is SupporterRankUpNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function SupporterRankUpNotificationFromJSON(json: any): SupporterRankUpNotification { + return SupporterRankUpNotificationFromJSONTyped(json, false); +} + +export function SupporterRankUpNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterRankUpNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(SupporterRankUpNotificationActionFromJSON)), + }; +} + +export function SupporterRankUpNotificationToJSON(value?: SupporterRankUpNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(SupporterRankUpNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationAction.ts new file mode 100644 index 00000000000..6c5f86d7063 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SupporterRankUpNotificationActionData } from './SupporterRankUpNotificationActionData'; +import { + SupporterRankUpNotificationActionDataFromJSON, + SupporterRankUpNotificationActionDataFromJSONTyped, + SupporterRankUpNotificationActionDataToJSON, +} from './SupporterRankUpNotificationActionData'; + +/** + * + * @export + * @interface SupporterRankUpNotificationAction + */ +export interface SupporterRankUpNotificationAction { + /** + * + * @type {string} + * @memberof SupporterRankUpNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof SupporterRankUpNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof SupporterRankUpNotificationAction + */ + timestamp: number; + /** + * + * @type {SupporterRankUpNotificationActionData} + * @memberof SupporterRankUpNotificationAction + */ + data: SupporterRankUpNotificationActionData; +} + +/** + * Check if a given object implements the SupporterRankUpNotificationAction interface. + */ +export function instanceOfSupporterRankUpNotificationAction(value: object): value is SupporterRankUpNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function SupporterRankUpNotificationActionFromJSON(json: any): SupporterRankUpNotificationAction { + return SupporterRankUpNotificationActionFromJSONTyped(json, false); +} + +export function SupporterRankUpNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterRankUpNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': SupporterRankUpNotificationActionDataFromJSON(json['data']), + }; +} + +export function SupporterRankUpNotificationActionToJSON(value?: SupporterRankUpNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': SupporterRankUpNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationActionData.ts new file mode 100644 index 00000000000..e77f8a13f91 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SupporterRankUpNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SupporterRankUpNotificationActionData + */ +export interface SupporterRankUpNotificationActionData { + /** + * + * @type {number} + * @memberof SupporterRankUpNotificationActionData + */ + rank: number; + /** + * + * @type {string} + * @memberof SupporterRankUpNotificationActionData + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof SupporterRankUpNotificationActionData + */ + receiverUserId: string; +} + +/** + * Check if a given object implements the SupporterRankUpNotificationActionData interface. + */ +export function instanceOfSupporterRankUpNotificationActionData(value: object): value is SupporterRankUpNotificationActionData { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "receiverUserId" in value && value["receiverUserId"] !== undefined; + + return isInstance; +} + +export function SupporterRankUpNotificationActionDataFromJSON(json: any): SupporterRankUpNotificationActionData { + return SupporterRankUpNotificationActionDataFromJSONTyped(json, false); +} + +export function SupporterRankUpNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterRankUpNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'senderUserId': json['sender_user_id'], + 'receiverUserId': json['receiver_user_id'], + }; +} + +export function SupporterRankUpNotificationActionDataToJSON(value?: SupporterRankUpNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'sender_user_id': value.senderUserId, + 'receiver_user_id': value.receiverUserId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotification.ts new file mode 100644 index 00000000000..e6f9d6c13cf --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TastemakerNotificationAction } from './TastemakerNotificationAction'; +import { + TastemakerNotificationActionFromJSON, + TastemakerNotificationActionFromJSONTyped, + TastemakerNotificationActionToJSON, +} from './TastemakerNotificationAction'; + +/** + * + * @export + * @interface TastemakerNotification + */ +export interface TastemakerNotification { + /** + * + * @type {string} + * @memberof TastemakerNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TastemakerNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TastemakerNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TastemakerNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TastemakerNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TastemakerNotification interface. + */ +export function instanceOfTastemakerNotification(value: object): value is TastemakerNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TastemakerNotificationFromJSON(json: any): TastemakerNotification { + return TastemakerNotificationFromJSONTyped(json, false); +} + +export function TastemakerNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TastemakerNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TastemakerNotificationActionFromJSON)), + }; +} + +export function TastemakerNotificationToJSON(value?: TastemakerNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TastemakerNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationAction.ts new file mode 100644 index 00000000000..b782337b993 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TastemakerNotificationActionData } from './TastemakerNotificationActionData'; +import { + TastemakerNotificationActionDataFromJSON, + TastemakerNotificationActionDataFromJSONTyped, + TastemakerNotificationActionDataToJSON, +} from './TastemakerNotificationActionData'; + +/** + * + * @export + * @interface TastemakerNotificationAction + */ +export interface TastemakerNotificationAction { + /** + * + * @type {string} + * @memberof TastemakerNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TastemakerNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TastemakerNotificationAction + */ + timestamp: number; + /** + * + * @type {TastemakerNotificationActionData} + * @memberof TastemakerNotificationAction + */ + data: TastemakerNotificationActionData; +} + +/** + * Check if a given object implements the TastemakerNotificationAction interface. + */ +export function instanceOfTastemakerNotificationAction(value: object): value is TastemakerNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TastemakerNotificationActionFromJSON(json: any): TastemakerNotificationAction { + return TastemakerNotificationActionFromJSONTyped(json, false); +} + +export function TastemakerNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TastemakerNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TastemakerNotificationActionDataFromJSON(json['data']), + }; +} + +export function TastemakerNotificationActionToJSON(value?: TastemakerNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TastemakerNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationActionData.ts new file mode 100644 index 00000000000..4acd42b4f23 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TastemakerNotificationActionData.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TastemakerNotificationActionData + */ +export interface TastemakerNotificationActionData { + /** + * + * @type {string} + * @memberof TastemakerNotificationActionData + */ + tastemakerItemOwnerId: string; + /** + * + * @type {string} + * @memberof TastemakerNotificationActionData + */ + tastemakerItemId: string; + /** + * + * @type {string} + * @memberof TastemakerNotificationActionData + */ + action: string; + /** + * + * @type {string} + * @memberof TastemakerNotificationActionData + */ + tastemakerItemType: string; + /** + * + * @type {string} + * @memberof TastemakerNotificationActionData + */ + tastemakerUserId: string; +} + +/** + * Check if a given object implements the TastemakerNotificationActionData interface. + */ +export function instanceOfTastemakerNotificationActionData(value: object): value is TastemakerNotificationActionData { + let isInstance = true; + isInstance = isInstance && "tastemakerItemOwnerId" in value && value["tastemakerItemOwnerId"] !== undefined; + isInstance = isInstance && "tastemakerItemId" in value && value["tastemakerItemId"] !== undefined; + isInstance = isInstance && "action" in value && value["action"] !== undefined; + isInstance = isInstance && "tastemakerItemType" in value && value["tastemakerItemType"] !== undefined; + isInstance = isInstance && "tastemakerUserId" in value && value["tastemakerUserId"] !== undefined; + + return isInstance; +} + +export function TastemakerNotificationActionDataFromJSON(json: any): TastemakerNotificationActionData { + return TastemakerNotificationActionDataFromJSONTyped(json, false); +} + +export function TastemakerNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TastemakerNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'tastemakerItemOwnerId': json['tastemaker_item_owner_id'], + 'tastemakerItemId': json['tastemaker_item_id'], + 'action': json['action'], + 'tastemakerItemType': json['tastemaker_item_type'], + 'tastemakerUserId': json['tastemaker_user_id'], + }; +} + +export function TastemakerNotificationActionDataToJSON(value?: TastemakerNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'tastemaker_item_owner_id': value.tastemakerItemOwnerId, + 'tastemaker_item_id': value.tastemakerItemId, + 'action': value.action, + 'tastemaker_item_type': value.tastemakerItemType, + 'tastemaker_user_id': value.tastemakerUserId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotification.ts new file mode 100644 index 00000000000..90e41a10b3b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TierChangeNotificationAction } from './TierChangeNotificationAction'; +import { + TierChangeNotificationActionFromJSON, + TierChangeNotificationActionFromJSONTyped, + TierChangeNotificationActionToJSON, +} from './TierChangeNotificationAction'; + +/** + * + * @export + * @interface TierChangeNotification + */ +export interface TierChangeNotification { + /** + * + * @type {string} + * @memberof TierChangeNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TierChangeNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TierChangeNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TierChangeNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TierChangeNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TierChangeNotification interface. + */ +export function instanceOfTierChangeNotification(value: object): value is TierChangeNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TierChangeNotificationFromJSON(json: any): TierChangeNotification { + return TierChangeNotificationFromJSONTyped(json, false); +} + +export function TierChangeNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TierChangeNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TierChangeNotificationActionFromJSON)), + }; +} + +export function TierChangeNotificationToJSON(value?: TierChangeNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TierChangeNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationAction.ts new file mode 100644 index 00000000000..65b688bc87d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TierChangeNotificationActionData } from './TierChangeNotificationActionData'; +import { + TierChangeNotificationActionDataFromJSON, + TierChangeNotificationActionDataFromJSONTyped, + TierChangeNotificationActionDataToJSON, +} from './TierChangeNotificationActionData'; + +/** + * + * @export + * @interface TierChangeNotificationAction + */ +export interface TierChangeNotificationAction { + /** + * + * @type {string} + * @memberof TierChangeNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TierChangeNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TierChangeNotificationAction + */ + timestamp: number; + /** + * + * @type {TierChangeNotificationActionData} + * @memberof TierChangeNotificationAction + */ + data: TierChangeNotificationActionData; +} + +/** + * Check if a given object implements the TierChangeNotificationAction interface. + */ +export function instanceOfTierChangeNotificationAction(value: object): value is TierChangeNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TierChangeNotificationActionFromJSON(json: any): TierChangeNotificationAction { + return TierChangeNotificationActionFromJSONTyped(json, false); +} + +export function TierChangeNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TierChangeNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TierChangeNotificationActionDataFromJSON(json['data']), + }; +} + +export function TierChangeNotificationActionToJSON(value?: TierChangeNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TierChangeNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationActionData.ts new file mode 100644 index 00000000000..dd0789f2b92 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TierChangeNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TierChangeNotificationActionData + */ +export interface TierChangeNotificationActionData { + /** + * + * @type {string} + * @memberof TierChangeNotificationActionData + */ + newTier: string; + /** + * + * @type {string} + * @memberof TierChangeNotificationActionData + */ + currentValue: string; + /** + * + * @type {number} + * @memberof TierChangeNotificationActionData + */ + newTierValue: number; +} + +/** + * Check if a given object implements the TierChangeNotificationActionData interface. + */ +export function instanceOfTierChangeNotificationActionData(value: object): value is TierChangeNotificationActionData { + let isInstance = true; + isInstance = isInstance && "newTier" in value && value["newTier"] !== undefined; + isInstance = isInstance && "currentValue" in value && value["currentValue"] !== undefined; + isInstance = isInstance && "newTierValue" in value && value["newTierValue"] !== undefined; + + return isInstance; +} + +export function TierChangeNotificationActionDataFromJSON(json: any): TierChangeNotificationActionData { + return TierChangeNotificationActionDataFromJSONTyped(json, false); +} + +export function TierChangeNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TierChangeNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'newTier': json['new_tier'], + 'currentValue': json['current_value'], + 'newTierValue': json['new_tier_value'], + }; +} + +export function TierChangeNotificationActionDataToJSON(value?: TierChangeNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'new_tier': value.newTier, + 'current_value': value.currentValue, + 'new_tier_value': value.newTierValue, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TopGenreUsersResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TopGenreUsersResponseFull.ts new file mode 100644 index 00000000000..b9935c0dafb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TopGenreUsersResponseFull.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TopGenreUsersResponseFull + */ +export interface TopGenreUsersResponseFull { + /** + * + * @type {number} + * @memberof TopGenreUsersResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TopGenreUsersResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TopGenreUsersResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TopGenreUsersResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TopGenreUsersResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof TopGenreUsersResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TopGenreUsersResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TopGenreUsersResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the TopGenreUsersResponseFull interface. + */ +export function instanceOfTopGenreUsersResponseFull(value: object): value is TopGenreUsersResponseFull { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function TopGenreUsersResponseFullFromJSON(json: any): TopGenreUsersResponseFull { + return TopGenreUsersResponseFullFromJSONTyped(json, false); +} + +export function TopGenreUsersResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopGenreUsersResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(UserFullFromJSON)), + }; +} + +export function TopGenreUsersResponseFullToJSON(value?: TopGenreUsersResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(UserFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponseFull.ts new file mode 100644 index 00000000000..8b27a373bd9 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponseFull.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TopUsersResponseFull + */ +export interface TopUsersResponseFull { + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TopUsersResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof TopUsersResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TopUsersResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TopUsersResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the TopUsersResponseFull interface. + */ +export function instanceOfTopUsersResponseFull(value: object): value is TopUsersResponseFull { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function TopUsersResponseFullFromJSON(json: any): TopUsersResponseFull { + return TopUsersResponseFullFromJSONTyped(json, false); +} + +export function TopUsersResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopUsersResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(UserFullFromJSON)), + }; +} + +export function TopUsersResponseFullToJSON(value?: TopUsersResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(UserFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackActivityFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackActivityFull.ts new file mode 100644 index 00000000000..4078a84856e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackActivityFull.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ActivityFull } from './ActivityFull'; +import { + ActivityFullFromJSON, + ActivityFullFromJSONTyped, + ActivityFullToJSON, +} from './ActivityFull'; +import type { TrackFull } from './TrackFull'; +import { + TrackFullFromJSON, + TrackFullFromJSONTyped, + TrackFullToJSON, +} from './TrackFull'; + +/** + * + * @export + * @interface TrackActivityFull + */ +export interface TrackActivityFull extends ActivityFull { + /** + * + * @type {string} + * @memberof TrackActivityFull + */ + itemType: TrackActivityFullItemTypeEnum; + /** + * + * @type {TrackFull} + * @memberof TrackActivityFull + */ + item: TrackFull; +} + + +/** + * @export + */ +export const TrackActivityFullItemTypeEnum = { + Track: 'track' +} as const; +export type TrackActivityFullItemTypeEnum = typeof TrackActivityFullItemTypeEnum[keyof typeof TrackActivityFullItemTypeEnum]; + + +/** + * Check if a given object implements the TrackActivityFull interface. + */ +export function instanceOfTrackActivityFull(value: object): value is TrackActivityFull { + let isInstance = true; + isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + + return isInstance; +} + +export function TrackActivityFullFromJSON(json: any): TrackActivityFull { + return TrackActivityFullFromJSONTyped(json, false); +} + +export function TrackActivityFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackActivityFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + ...ActivityFullFromJSONTyped(json, ignoreDiscriminator), + 'itemType': json['item_type'], + 'item': TrackFullFromJSON(json['item']), + }; +} + +export function TrackActivityFullToJSON(value?: TrackActivityFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + ...ActivityFullToJSON(value), + 'item_type': value.itemType, + 'item': TrackFullToJSON(value.item), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotification.ts new file mode 100644 index 00000000000..4daa5983d76 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPlaylistNotificationAction } from './TrackAddedToPlaylistNotificationAction'; +import { + TrackAddedToPlaylistNotificationActionFromJSON, + TrackAddedToPlaylistNotificationActionFromJSONTyped, + TrackAddedToPlaylistNotificationActionToJSON, +} from './TrackAddedToPlaylistNotificationAction'; + +/** + * + * @export + * @interface TrackAddedToPlaylistNotification + */ +export interface TrackAddedToPlaylistNotification { + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TrackAddedToPlaylistNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TrackAddedToPlaylistNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TrackAddedToPlaylistNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TrackAddedToPlaylistNotification interface. + */ +export function instanceOfTrackAddedToPlaylistNotification(value: object): value is TrackAddedToPlaylistNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPlaylistNotificationFromJSON(json: any): TrackAddedToPlaylistNotification { + return TrackAddedToPlaylistNotificationFromJSONTyped(json, false); +} + +export function TrackAddedToPlaylistNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPlaylistNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TrackAddedToPlaylistNotificationActionFromJSON)), + }; +} + +export function TrackAddedToPlaylistNotificationToJSON(value?: TrackAddedToPlaylistNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TrackAddedToPlaylistNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationAction.ts new file mode 100644 index 00000000000..95f0315a279 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPlaylistNotificationActionData } from './TrackAddedToPlaylistNotificationActionData'; +import { + TrackAddedToPlaylistNotificationActionDataFromJSON, + TrackAddedToPlaylistNotificationActionDataFromJSONTyped, + TrackAddedToPlaylistNotificationActionDataToJSON, +} from './TrackAddedToPlaylistNotificationActionData'; + +/** + * + * @export + * @interface TrackAddedToPlaylistNotificationAction + */ +export interface TrackAddedToPlaylistNotificationAction { + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TrackAddedToPlaylistNotificationAction + */ + timestamp: number; + /** + * + * @type {TrackAddedToPlaylistNotificationActionData} + * @memberof TrackAddedToPlaylistNotificationAction + */ + data: TrackAddedToPlaylistNotificationActionData; +} + +/** + * Check if a given object implements the TrackAddedToPlaylistNotificationAction interface. + */ +export function instanceOfTrackAddedToPlaylistNotificationAction(value: object): value is TrackAddedToPlaylistNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPlaylistNotificationActionFromJSON(json: any): TrackAddedToPlaylistNotificationAction { + return TrackAddedToPlaylistNotificationActionFromJSONTyped(json, false); +} + +export function TrackAddedToPlaylistNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPlaylistNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TrackAddedToPlaylistNotificationActionDataFromJSON(json['data']), + }; +} + +export function TrackAddedToPlaylistNotificationActionToJSON(value?: TrackAddedToPlaylistNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TrackAddedToPlaylistNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationActionData.ts new file mode 100644 index 00000000000..3921ca28a86 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackAddedToPlaylistNotificationActionData + */ +export interface TrackAddedToPlaylistNotificationActionData { + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationActionData + */ + trackId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationActionData + */ + playlistId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationActionData + */ + playlistOwnerId: string; +} + +/** + * Check if a given object implements the TrackAddedToPlaylistNotificationActionData interface. + */ +export function instanceOfTrackAddedToPlaylistNotificationActionData(value: object): value is TrackAddedToPlaylistNotificationActionData { + let isInstance = true; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + isInstance = isInstance && "playlistOwnerId" in value && value["playlistOwnerId"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPlaylistNotificationActionDataFromJSON(json: any): TrackAddedToPlaylistNotificationActionData { + return TrackAddedToPlaylistNotificationActionDataFromJSONTyped(json, false); +} + +export function TrackAddedToPlaylistNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPlaylistNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': json['track_id'], + 'playlistId': json['playlist_id'], + 'playlistOwnerId': json['playlist_owner_id'], + }; +} + +export function TrackAddedToPlaylistNotificationActionDataToJSON(value?: TrackAddedToPlaylistNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + 'playlist_id': value.playlistId, + 'playlist_owner_id': value.playlistOwnerId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotification.ts new file mode 100644 index 00000000000..23c4c2feaf8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPurchasedAlbumNotificationAction } from './TrackAddedToPurchasedAlbumNotificationAction'; +import { + TrackAddedToPurchasedAlbumNotificationActionFromJSON, + TrackAddedToPurchasedAlbumNotificationActionFromJSONTyped, + TrackAddedToPurchasedAlbumNotificationActionToJSON, +} from './TrackAddedToPurchasedAlbumNotificationAction'; + +/** + * + * @export + * @interface TrackAddedToPurchasedAlbumNotification + */ +export interface TrackAddedToPurchasedAlbumNotification { + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TrackAddedToPurchasedAlbumNotification interface. + */ +export function instanceOfTrackAddedToPurchasedAlbumNotification(value: object): value is TrackAddedToPurchasedAlbumNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPurchasedAlbumNotificationFromJSON(json: any): TrackAddedToPurchasedAlbumNotification { + return TrackAddedToPurchasedAlbumNotificationFromJSONTyped(json, false); +} + +export function TrackAddedToPurchasedAlbumNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPurchasedAlbumNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TrackAddedToPurchasedAlbumNotificationActionFromJSON)), + }; +} + +export function TrackAddedToPurchasedAlbumNotificationToJSON(value?: TrackAddedToPurchasedAlbumNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TrackAddedToPurchasedAlbumNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationAction.ts new file mode 100644 index 00000000000..3af07143b09 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPurchasedAlbumNotificationActionData } from './TrackAddedToPurchasedAlbumNotificationActionData'; +import { + TrackAddedToPurchasedAlbumNotificationActionDataFromJSON, + TrackAddedToPurchasedAlbumNotificationActionDataFromJSONTyped, + TrackAddedToPurchasedAlbumNotificationActionDataToJSON, +} from './TrackAddedToPurchasedAlbumNotificationActionData'; + +/** + * + * @export + * @interface TrackAddedToPurchasedAlbumNotificationAction + */ +export interface TrackAddedToPurchasedAlbumNotificationAction { + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + timestamp: number; + /** + * + * @type {TrackAddedToPurchasedAlbumNotificationActionData} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + data: TrackAddedToPurchasedAlbumNotificationActionData; +} + +/** + * Check if a given object implements the TrackAddedToPurchasedAlbumNotificationAction interface. + */ +export function instanceOfTrackAddedToPurchasedAlbumNotificationAction(value: object): value is TrackAddedToPurchasedAlbumNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPurchasedAlbumNotificationActionFromJSON(json: any): TrackAddedToPurchasedAlbumNotificationAction { + return TrackAddedToPurchasedAlbumNotificationActionFromJSONTyped(json, false); +} + +export function TrackAddedToPurchasedAlbumNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPurchasedAlbumNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TrackAddedToPurchasedAlbumNotificationActionDataFromJSON(json['data']), + }; +} + +export function TrackAddedToPurchasedAlbumNotificationActionToJSON(value?: TrackAddedToPurchasedAlbumNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TrackAddedToPurchasedAlbumNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationActionData.ts new file mode 100644 index 00000000000..7e924c5c409 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackAddedToPurchasedAlbumNotificationActionData + */ +export interface TrackAddedToPurchasedAlbumNotificationActionData { + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationActionData + */ + trackId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationActionData + */ + playlistId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationActionData + */ + playlistOwnerId: string; +} + +/** + * Check if a given object implements the TrackAddedToPurchasedAlbumNotificationActionData interface. + */ +export function instanceOfTrackAddedToPurchasedAlbumNotificationActionData(value: object): value is TrackAddedToPurchasedAlbumNotificationActionData { + let isInstance = true; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + isInstance = isInstance && "playlistOwnerId" in value && value["playlistOwnerId"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPurchasedAlbumNotificationActionDataFromJSON(json: any): TrackAddedToPurchasedAlbumNotificationActionData { + return TrackAddedToPurchasedAlbumNotificationActionDataFromJSONTyped(json, false); +} + +export function TrackAddedToPurchasedAlbumNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPurchasedAlbumNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': json['track_id'], + 'playlistId': json['playlist_id'], + 'playlistOwnerId': json['playlist_owner_id'], + }; +} + +export function TrackAddedToPurchasedAlbumNotificationActionDataToJSON(value?: TrackAddedToPurchasedAlbumNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + 'playlist_id': value.playlistId, + 'playlist_owner_id': value.playlistOwnerId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackArtworkFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackArtworkFull.ts new file mode 100644 index 00000000000..f49737e8317 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackArtworkFull.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackArtworkFull + */ +export interface TrackArtworkFull { + /** + * + * @type {string} + * @memberof TrackArtworkFull + */ + _150x150?: string; + /** + * + * @type {string} + * @memberof TrackArtworkFull + */ + _480x480?: string; + /** + * + * @type {string} + * @memberof TrackArtworkFull + */ + _1000x1000?: string; + /** + * + * @type {Array} + * @memberof TrackArtworkFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the TrackArtworkFull interface. + */ +export function instanceOfTrackArtworkFull(value: object): value is TrackArtworkFull { + let isInstance = true; + + return isInstance; +} + +export function TrackArtworkFullFromJSON(json: any): TrackArtworkFull { + return TrackArtworkFullFromJSONTyped(json, false); +} + +export function TrackArtworkFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackArtworkFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_150x150': !exists(json, '150x150') ? undefined : json['150x150'], + '_480x480': !exists(json, '480x480') ? undefined : json['480x480'], + '_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function TrackArtworkFullToJSON(value?: TrackArtworkFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '150x150': value._150x150, + '480x480': value._480x480, + '1000x1000': value._1000x1000, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackFeedItem.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackFeedItem.ts new file mode 100644 index 00000000000..76a9a976d12 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackFeedItem.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackFull } from './TrackFull'; +import { + TrackFullFromJSON, + TrackFullFromJSONTyped, + TrackFullToJSON, +} from './TrackFull'; + +/** + * + * @export + * @interface TrackFeedItem + */ +export interface TrackFeedItem { + /** + * + * @type {string} + * @memberof TrackFeedItem + */ + type: string; + /** + * + * @type {TrackFull} + * @memberof TrackFeedItem + */ + item: TrackFull; +} + +/** + * Check if a given object implements the TrackFeedItem interface. + */ +export function instanceOfTrackFeedItem(value: object): value is TrackFeedItem { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + + return isInstance; +} + +export function TrackFeedItemFromJSON(json: any): TrackFeedItem { + return TrackFeedItemFromJSONTyped(json, false); +} + +export function TrackFeedItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackFeedItem { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'item': TrackFullFromJSON(json['item']), + }; +} + +export function TrackFeedItemToJSON(value?: TrackFeedItem | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'item': TrackFullToJSON(value.item), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackFull.ts new file mode 100644 index 00000000000..03928417de1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackFull.ts @@ -0,0 +1,814 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { AlbumBacklink } from './AlbumBacklink'; +import { + AlbumBacklinkFromJSON, + AlbumBacklinkFromJSONTyped, + AlbumBacklinkToJSON, +} from './AlbumBacklink'; +import type { CoverArt } from './CoverArt'; +import { + CoverArtFromJSON, + CoverArtFromJSONTyped, + CoverArtToJSON, +} from './CoverArt'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; +import type { FullRemixParent } from './FullRemixParent'; +import { + FullRemixParentFromJSON, + FullRemixParentFromJSONTyped, + FullRemixParentToJSON, +} from './FullRemixParent'; +import type { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { StemParent } from './StemParent'; +import { + StemParentFromJSON, + StemParentFromJSONTyped, + StemParentToJSON, +} from './StemParent'; +import type { TrackArtworkFull } from './TrackArtworkFull'; +import { + TrackArtworkFullFromJSON, + TrackArtworkFullFromJSONTyped, + TrackArtworkFullToJSON, +} from './TrackArtworkFull'; +import type { TrackSegment } from './TrackSegment'; +import { + TrackSegmentFromJSON, + TrackSegmentFromJSONTyped, + TrackSegmentToJSON, +} from './TrackSegment'; +import type { UrlWithMirrors } from './UrlWithMirrors'; +import { + UrlWithMirrorsFromJSON, + UrlWithMirrorsFromJSONTyped, + UrlWithMirrorsToJSON, +} from './UrlWithMirrors'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface TrackFull + */ +export interface TrackFull { + /** + * + * @type {TrackArtworkFull} + * @memberof TrackFull + */ + artwork: TrackArtworkFull; + /** + * + * @type {string} + * @memberof TrackFull + */ + description?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + genre: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + id: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + trackCid?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + previewCid?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + origFileCid?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + origFilename?: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isOriginalAvailable: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + mood?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + releaseDate?: string; + /** + * + * @type {FullRemixParent} + * @memberof TrackFull + */ + remixOf: FullRemixParent; + /** + * + * @type {number} + * @memberof TrackFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof TrackFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof TrackFull + */ + commentCount: number; + /** + * + * @type {string} + * @memberof TrackFull + */ + tags?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + title: string; + /** + * + * @type {UserFull} + * @memberof TrackFull + */ + user: UserFull; + /** + * + * @type {number} + * @memberof TrackFull + */ + duration: number; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isDownloadable: boolean; + /** + * + * @type {number} + * @memberof TrackFull + */ + playCount: number; + /** + * + * @type {string} + * @memberof TrackFull + */ + permalink: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isStreamable?: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + ddexApp?: string; + /** + * + * @type {Array} + * @memberof TrackFull + */ + playlistsContainingTrack?: Array; + /** + * + * @type {number} + * @memberof TrackFull + */ + pinnedCommentId?: number; + /** + * + * @type {AlbumBacklink} + * @memberof TrackFull + */ + albumBacklink?: AlbumBacklink; + /** + * Describes what access the given user has + * @type {Access} + * @memberof TrackFull + */ + access: Access; + /** + * The blocknumber this track was last updated + * @type {number} + * @memberof TrackFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof TrackFull + */ + createDate?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverArtSizes: string; + /** + * + * @type {CoverArt} + * @memberof TrackFull + */ + coverArtCids?: CoverArt; + /** + * + * @type {string} + * @memberof TrackFull + */ + createdAt: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + creditsSplits?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + isrc?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + license?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + iswc?: string; + /** + * + * @type {FieldVisibility} + * @memberof TrackFull + */ + fieldVisibility: FieldVisibility; + /** + * + * @type {Array} + * @memberof TrackFull + */ + followeeReposts: Array; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isScheduledRelease: boolean; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isUnlisted: boolean; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {Array} + * @memberof TrackFull + */ + followeeFavorites: Array; + /** + * + * @type {string} + * @memberof TrackFull + */ + routeId: string; + /** + * + * @type {StemParent} + * @memberof TrackFull + */ + stemOf?: StemParent; + /** + * + * @type {Array} + * @memberof TrackFull + */ + trackSegments: Array; + /** + * + * @type {string} + * @memberof TrackFull + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + userId: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isDelete: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverArt?: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isAvailable: boolean; + /** + * + * @type {number} + * @memberof TrackFull + */ + aiAttributionUserId?: number; + /** + * + * @type {Array} + * @memberof TrackFull + */ + allowedApiKeys?: Array; + /** + * + * @type {string} + * @memberof TrackFull + */ + audioUploadId?: string; + /** + * + * @type {number} + * @memberof TrackFull + */ + previewStartSeconds?: number; + /** + * + * @type {number} + * @memberof TrackFull + */ + bpm?: number; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isCustomBpm?: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + musicalKey?: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isCustomMusicalKey?: boolean; + /** + * + * @type {number} + * @memberof TrackFull + */ + audioAnalysisErrorCount?: number; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + commentsDisabled?: boolean; + /** + * + * @type {object} + * @memberof TrackFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof TrackFull + */ + artists?: Array; + /** + * + * @type {Array} + * @memberof TrackFull + */ + resourceContributors?: Array; + /** + * + * @type {Array} + * @memberof TrackFull + */ + indirectResourceContributors?: Array; + /** + * + * @type {object} + * @memberof TrackFull + */ + rightsController?: object; + /** + * + * @type {object} + * @memberof TrackFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof TrackFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof TrackFull + */ + parentalWarningType?: string; + /** + * Whether or not the owner has restricted streaming behind an access gate + * @type {boolean} + * @memberof TrackFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof TrackFull + */ + streamConditions?: AccessGate; + /** + * Whether or not the owner has restricted downloading behind an access gate + * @type {boolean} + * @memberof TrackFull + */ + isDownloadGated: boolean; + /** + * How to unlock the track download + * @type {AccessGate} + * @memberof TrackFull + */ + downloadConditions?: AccessGate; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverOriginalSongTitle?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverOriginalArtist?: string; + /** + * Indicates whether the track is owned by the user for MRI sake + * @type {boolean} + * @memberof TrackFull + */ + isOwnedByUser: boolean; + /** + * + * @type {UrlWithMirrors} + * @memberof TrackFull + */ + stream: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof TrackFull + */ + download: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof TrackFull + */ + preview: UrlWithMirrors; +} + +/** + * Check if a given object implements the TrackFull interface. + */ +export function instanceOfTrackFull(value: object): value is TrackFull { + let isInstance = true; + isInstance = isInstance && "artwork" in value && value["artwork"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isOriginalAvailable" in value && value["isOriginalAvailable"] !== undefined; + isInstance = isInstance && "remixOf" in value && value["remixOf"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "commentCount" in value && value["commentCount"] !== undefined; + isInstance = isInstance && "title" in value && value["title"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "duration" in value && value["duration"] !== undefined; + isInstance = isInstance && "isDownloadable" in value && value["isDownloadable"] !== undefined; + isInstance = isInstance && "playCount" in value && value["playCount"] !== undefined; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "coverArtSizes" in value && value["coverArtSizes"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "fieldVisibility" in value && value["fieldVisibility"] !== undefined; + isInstance = isInstance && "followeeReposts" in value && value["followeeReposts"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + isInstance = isInstance && "isUnlisted" in value && value["isUnlisted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "followeeFavorites" in value && value["followeeFavorites"] !== undefined; + isInstance = isInstance && "routeId" in value && value["routeId"] !== undefined; + isInstance = isInstance && "trackSegments" in value && value["trackSegments"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isAvailable" in value && value["isAvailable"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isDownloadGated" in value && value["isDownloadGated"] !== undefined; + isInstance = isInstance && "isOwnedByUser" in value && value["isOwnedByUser"] !== undefined; + isInstance = isInstance && "stream" in value && value["stream"] !== undefined; + isInstance = isInstance && "download" in value && value["download"] !== undefined; + isInstance = isInstance && "preview" in value && value["preview"] !== undefined; + + return isInstance; +} + +export function TrackFullFromJSON(json: any): TrackFull { + return TrackFullFromJSONTyped(json, false); +} + +export function TrackFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': TrackArtworkFullFromJSON(json['artwork']), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'genre': json['genre'], + 'id': json['id'], + 'trackCid': !exists(json, 'track_cid') ? undefined : json['track_cid'], + 'previewCid': !exists(json, 'preview_cid') ? undefined : json['preview_cid'], + 'origFileCid': !exists(json, 'orig_file_cid') ? undefined : json['orig_file_cid'], + 'origFilename': !exists(json, 'orig_filename') ? undefined : json['orig_filename'], + 'isOriginalAvailable': json['is_original_available'], + 'mood': !exists(json, 'mood') ? undefined : json['mood'], + 'releaseDate': !exists(json, 'release_date') ? undefined : json['release_date'], + 'remixOf': FullRemixParentFromJSON(json['remix_of']), + 'repostCount': json['repost_count'], + 'favoriteCount': json['favorite_count'], + 'commentCount': json['comment_count'], + 'tags': !exists(json, 'tags') ? undefined : json['tags'], + 'title': json['title'], + 'user': UserFullFromJSON(json['user']), + 'duration': json['duration'], + 'isDownloadable': json['is_downloadable'], + 'playCount': json['play_count'], + 'permalink': json['permalink'], + 'isStreamable': !exists(json, 'is_streamable') ? undefined : json['is_streamable'], + 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], + 'playlistsContainingTrack': !exists(json, 'playlists_containing_track') ? undefined : json['playlists_containing_track'], + 'pinnedCommentId': !exists(json, 'pinned_comment_id') ? undefined : json['pinned_comment_id'], + 'albumBacklink': !exists(json, 'album_backlink') ? undefined : AlbumBacklinkFromJSON(json['album_backlink']), + 'access': AccessFromJSON(json['access']), + 'blocknumber': json['blocknumber'], + 'createDate': !exists(json, 'create_date') ? undefined : json['create_date'], + 'coverArtSizes': json['cover_art_sizes'], + 'coverArtCids': !exists(json, 'cover_art_cids') ? undefined : CoverArtFromJSON(json['cover_art_cids']), + 'createdAt': json['created_at'], + 'creditsSplits': !exists(json, 'credits_splits') ? undefined : json['credits_splits'], + 'isrc': !exists(json, 'isrc') ? undefined : json['isrc'], + 'license': !exists(json, 'license') ? undefined : json['license'], + 'iswc': !exists(json, 'iswc') ? undefined : json['iswc'], + 'fieldVisibility': FieldVisibilityFromJSON(json['field_visibility']), + 'followeeReposts': ((json['followee_reposts'] as Array).map(RepostFromJSON)), + 'hasCurrentUserReposted': json['has_current_user_reposted'], + 'isScheduledRelease': json['is_scheduled_release'], + 'isUnlisted': json['is_unlisted'], + 'hasCurrentUserSaved': json['has_current_user_saved'], + 'followeeFavorites': ((json['followee_favorites'] as Array).map(FavoriteFromJSON)), + 'routeId': json['route_id'], + 'stemOf': !exists(json, 'stem_of') ? undefined : StemParentFromJSON(json['stem_of']), + 'trackSegments': ((json['track_segments'] as Array).map(TrackSegmentFromJSON)), + 'updatedAt': json['updated_at'], + 'userId': json['user_id'], + 'isDelete': json['is_delete'], + 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], + 'isAvailable': json['is_available'], + 'aiAttributionUserId': !exists(json, 'ai_attribution_user_id') ? undefined : json['ai_attribution_user_id'], + 'allowedApiKeys': !exists(json, 'allowed_api_keys') ? undefined : json['allowed_api_keys'], + 'audioUploadId': !exists(json, 'audio_upload_id') ? undefined : json['audio_upload_id'], + 'previewStartSeconds': !exists(json, 'preview_start_seconds') ? undefined : json['preview_start_seconds'], + 'bpm': !exists(json, 'bpm') ? undefined : json['bpm'], + 'isCustomBpm': !exists(json, 'is_custom_bpm') ? undefined : json['is_custom_bpm'], + 'musicalKey': !exists(json, 'musical_key') ? undefined : json['musical_key'], + 'isCustomMusicalKey': !exists(json, 'is_custom_musical_key') ? undefined : json['is_custom_musical_key'], + 'audioAnalysisErrorCount': !exists(json, 'audio_analysis_error_count') ? undefined : json['audio_analysis_error_count'], + 'commentsDisabled': !exists(json, 'comments_disabled') ? undefined : json['comments_disabled'], + 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], + 'artists': !exists(json, 'artists') ? undefined : json['artists'], + 'resourceContributors': !exists(json, 'resource_contributors') ? undefined : json['resource_contributors'], + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : json['indirect_resource_contributors'], + 'rightsController': !exists(json, 'rights_controller') ? undefined : json['rights_controller'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isDownloadGated': json['is_download_gated'], + 'downloadConditions': !exists(json, 'download_conditions') ? undefined : AccessGateFromJSON(json['download_conditions']), + 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], + 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], + 'isOwnedByUser': json['is_owned_by_user'], + 'stream': UrlWithMirrorsFromJSON(json['stream']), + 'download': UrlWithMirrorsFromJSON(json['download']), + 'preview': UrlWithMirrorsFromJSON(json['preview']), + }; +} + +export function TrackFullToJSON(value?: TrackFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': TrackArtworkFullToJSON(value.artwork), + 'description': value.description, + 'genre': value.genre, + 'id': value.id, + 'track_cid': value.trackCid, + 'preview_cid': value.previewCid, + 'orig_file_cid': value.origFileCid, + 'orig_filename': value.origFilename, + 'is_original_available': value.isOriginalAvailable, + 'mood': value.mood, + 'release_date': value.releaseDate, + 'remix_of': FullRemixParentToJSON(value.remixOf), + 'repost_count': value.repostCount, + 'favorite_count': value.favoriteCount, + 'comment_count': value.commentCount, + 'tags': value.tags, + 'title': value.title, + 'user': UserFullToJSON(value.user), + 'duration': value.duration, + 'is_downloadable': value.isDownloadable, + 'play_count': value.playCount, + 'permalink': value.permalink, + 'is_streamable': value.isStreamable, + 'ddex_app': value.ddexApp, + 'playlists_containing_track': value.playlistsContainingTrack, + 'pinned_comment_id': value.pinnedCommentId, + 'album_backlink': AlbumBacklinkToJSON(value.albumBacklink), + 'access': AccessToJSON(value.access), + 'blocknumber': value.blocknumber, + 'create_date': value.createDate, + 'cover_art_sizes': value.coverArtSizes, + 'cover_art_cids': CoverArtToJSON(value.coverArtCids), + 'created_at': value.createdAt, + 'credits_splits': value.creditsSplits, + 'isrc': value.isrc, + 'license': value.license, + 'iswc': value.iswc, + 'field_visibility': FieldVisibilityToJSON(value.fieldVisibility), + 'followee_reposts': ((value.followeeReposts as Array).map(RepostToJSON)), + 'has_current_user_reposted': value.hasCurrentUserReposted, + 'is_scheduled_release': value.isScheduledRelease, + 'is_unlisted': value.isUnlisted, + 'has_current_user_saved': value.hasCurrentUserSaved, + 'followee_favorites': ((value.followeeFavorites as Array).map(FavoriteToJSON)), + 'route_id': value.routeId, + 'stem_of': StemParentToJSON(value.stemOf), + 'track_segments': ((value.trackSegments as Array).map(TrackSegmentToJSON)), + 'updated_at': value.updatedAt, + 'user_id': value.userId, + 'is_delete': value.isDelete, + 'cover_art': value.coverArt, + 'is_available': value.isAvailable, + 'ai_attribution_user_id': value.aiAttributionUserId, + 'allowed_api_keys': value.allowedApiKeys, + 'audio_upload_id': value.audioUploadId, + 'preview_start_seconds': value.previewStartSeconds, + 'bpm': value.bpm, + 'is_custom_bpm': value.isCustomBpm, + 'musical_key': value.musicalKey, + 'is_custom_musical_key': value.isCustomMusicalKey, + 'audio_analysis_error_count': value.audioAnalysisErrorCount, + 'comments_disabled': value.commentsDisabled, + 'ddex_release_ids': value.ddexReleaseIds, + 'artists': value.artists, + 'resource_contributors': value.resourceContributors, + 'indirect_resource_contributors': value.indirectResourceContributors, + 'rights_controller': value.rightsController, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_download_gated': value.isDownloadGated, + 'download_conditions': AccessGateToJSON(value.downloadConditions), + 'cover_original_song_title': value.coverOriginalSongTitle, + 'cover_original_artist': value.coverOriginalArtist, + 'is_owned_by_user': value.isOwnedByUser, + 'stream': UrlWithMirrorsToJSON(value.stream), + 'download': UrlWithMirrorsToJSON(value.download), + 'preview': UrlWithMirrorsToJSON(value.preview), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponseFull.ts new file mode 100644 index 00000000000..4db5239033a --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponseFull.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackActivityFull } from './TrackActivityFull'; +import { + TrackActivityFullFromJSON, + TrackActivityFullFromJSONTyped, + TrackActivityFullToJSON, +} from './TrackActivityFull'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TrackLibraryResponseFull + */ +export interface TrackLibraryResponseFull { + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrackLibraryResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof TrackLibraryResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrackLibraryResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TrackLibraryResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the TrackLibraryResponseFull interface. + */ +export function instanceOfTrackLibraryResponseFull(value: object): value is TrackLibraryResponseFull { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function TrackLibraryResponseFullFromJSON(json: any): TrackLibraryResponseFull { + return TrackLibraryResponseFullFromJSONTyped(json, false); +} + +export function TrackLibraryResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackLibraryResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(TrackActivityFullFromJSON)), + }; +} + +export function TrackLibraryResponseFullToJSON(value?: TrackLibraryResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(TrackActivityFullToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackMilestoneNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackMilestoneNotificationActionData.ts new file mode 100644 index 00000000000..852a28aadeb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackMilestoneNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackMilestoneNotificationActionData + */ +export interface TrackMilestoneNotificationActionData { + /** + * + * @type {string} + * @memberof TrackMilestoneNotificationActionData + */ + type: string; + /** + * + * @type {number} + * @memberof TrackMilestoneNotificationActionData + */ + threshold: number; + /** + * + * @type {string} + * @memberof TrackMilestoneNotificationActionData + */ + trackId: string; +} + +/** + * Check if a given object implements the TrackMilestoneNotificationActionData interface. + */ +export function instanceOfTrackMilestoneNotificationActionData(value: object): value is TrackMilestoneNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "threshold" in value && value["threshold"] !== undefined; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + + return isInstance; +} + +export function TrackMilestoneNotificationActionDataFromJSON(json: any): TrackMilestoneNotificationActionData { + return TrackMilestoneNotificationActionDataFromJSONTyped(json, false); +} + +export function TrackMilestoneNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackMilestoneNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'threshold': json['threshold'], + 'trackId': json['track_id'], + }; +} + +export function TrackMilestoneNotificationActionDataToJSON(value?: TrackMilestoneNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'threshold': value.threshold, + 'track_id': value.trackId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackSegment.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackSegment.ts new file mode 100644 index 00000000000..22dbd61f4fe --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackSegment.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackSegment + */ +export interface TrackSegment { + /** + * + * @type {number} + * @memberof TrackSegment + */ + duration: number; + /** + * + * @type {string} + * @memberof TrackSegment + */ + multihash: string; +} + +/** + * Check if a given object implements the TrackSegment interface. + */ +export function instanceOfTrackSegment(value: object): value is TrackSegment { + let isInstance = true; + isInstance = isInstance && "duration" in value && value["duration"] !== undefined; + isInstance = isInstance && "multihash" in value && value["multihash"] !== undefined; + + return isInstance; +} + +export function TrackSegmentFromJSON(json: any): TrackSegment { + return TrackSegmentFromJSONTyped(json, false); +} + +export function TrackSegmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackSegment { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'duration': json['duration'], + 'multihash': json['multihash'], + }; +} + +export function TrackSegmentToJSON(value?: TrackSegment | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'duration': value.duration, + 'multihash': value.multihash, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TransactionDetails.ts b/packages/sdk/src/sdk/api/generated/default/models/TransactionDetails.ts new file mode 100644 index 00000000000..a6bb31a5a19 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TransactionDetails.ts @@ -0,0 +1,135 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import { +} from './'; + +/** + * + * @export + * @interface TransactionDetails + */ +export interface TransactionDetails { + /** + * + * @type {string} + * @memberof TransactionDetails + */ + transactionDate: string; + /** + * + * @type {string} + * @memberof TransactionDetails + */ + transactionType: string; + /** + * + * @type {string} + * @memberof TransactionDetails + */ + method: string; + /** + * + * @type {string} + * @memberof TransactionDetails + */ + signature: string; + /** + * + * @type {string} + * @memberof TransactionDetails + */ + userBank: string; + /** + * + * @type {string} + * @memberof TransactionDetails + */ + change: string; + /** + * + * @type {string} + * @memberof TransactionDetails + */ + balance: string; + /** + * + * @type {object} + * @memberof TransactionDetails + */ + metadata: object; +} + +/** + * Check if a given object implements the TransactionDetails interface. + */ +export function instanceOfTransactionDetails(value: object): value is TransactionDetails { + let isInstance = true; + isInstance = isInstance && "transactionDate" in value && value["transactionDate"] !== undefined; + isInstance = isInstance && "transactionType" in value && value["transactionType"] !== undefined; + isInstance = isInstance && "method" in value && value["method"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "userBank" in value && value["userBank"] !== undefined; + isInstance = isInstance && "change" in value && value["change"] !== undefined; + isInstance = isInstance && "balance" in value && value["balance"] !== undefined; + isInstance = isInstance && "metadata" in value && value["metadata"] !== undefined; + + return isInstance; +} + +export function TransactionDetailsFromJSON(json: any): TransactionDetails { + return TransactionDetailsFromJSONTyped(json, false); +} + +export function TransactionDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionDetails { + if ((json === undefined) || (json === null)) { + return json; + } + if (!ignoreDiscriminator) { + } + return { + + 'transactionDate': json['transaction_date'], + 'transactionType': json['transaction_type'], + 'method': json['method'], + 'signature': json['signature'], + 'userBank': json['user_bank'], + 'change': json['change'], + 'balance': json['balance'], + 'metadata': json['metadata'], + }; +} + +export function TransactionDetailsToJSON(value?: TransactionDetails | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'transaction_date': value.transactionDate, + 'transaction_type': value.transactionType, + 'method': value.method, + 'signature': value.signature, + 'user_bank': value.userBank, + 'change': value.change, + 'balance': value.balance, + 'metadata': value.metadata, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryCountResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryCountResponse.ts new file mode 100644 index 00000000000..c06772791cf --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryCountResponse.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TransactionHistoryCountResponse + */ +export interface TransactionHistoryCountResponse { + /** + * + * @type {number} + * @memberof TransactionHistoryCountResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TransactionHistoryCountResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TransactionHistoryCountResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TransactionHistoryCountResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TransactionHistoryCountResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TransactionHistoryCountResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TransactionHistoryCountResponse + */ + version: VersionMetadata; + /** + * + * @type {number} + * @memberof TransactionHistoryCountResponse + */ + data?: number; +} + +/** + * Check if a given object implements the TransactionHistoryCountResponse interface. + */ +export function instanceOfTransactionHistoryCountResponse(value: object): value is TransactionHistoryCountResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function TransactionHistoryCountResponseFromJSON(json: any): TransactionHistoryCountResponse { + return TransactionHistoryCountResponseFromJSONTyped(json, false); +} + +export function TransactionHistoryCountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionHistoryCountResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : json['data'], + }; +} + +export function TransactionHistoryCountResponseToJSON(value?: TransactionHistoryCountResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryResponse.ts new file mode 100644 index 00000000000..19f414b28f1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TransactionHistoryResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TransactionDetails } from './TransactionDetails'; +import { + TransactionDetailsFromJSON, + TransactionDetailsFromJSONTyped, + TransactionDetailsToJSON, +} from './TransactionDetails'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TransactionHistoryResponse + */ +export interface TransactionHistoryResponse { + /** + * + * @type {number} + * @memberof TransactionHistoryResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TransactionHistoryResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TransactionHistoryResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TransactionHistoryResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TransactionHistoryResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TransactionHistoryResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TransactionHistoryResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TransactionHistoryResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the TransactionHistoryResponse interface. + */ +export function instanceOfTransactionHistoryResponse(value: object): value is TransactionHistoryResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function TransactionHistoryResponseFromJSON(json: any): TransactionHistoryResponse { + return TransactionHistoryResponseFromJSONTyped(json, false); +} + +export function TransactionHistoryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionHistoryResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(TransactionDetailsFromJSON)), + }; +} + +export function TransactionHistoryResponseToJSON(value?: TransactionHistoryResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(TransactionDetailsToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingNotification.ts new file mode 100644 index 00000000000..5a4b6bb0ca4 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrendingNotificationAction } from './TrendingNotificationAction'; +import { + TrendingNotificationActionFromJSON, + TrendingNotificationActionFromJSONTyped, + TrendingNotificationActionToJSON, +} from './TrendingNotificationAction'; + +/** + * + * @export + * @interface TrendingNotification + */ +export interface TrendingNotification { + /** + * + * @type {string} + * @memberof TrendingNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TrendingNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TrendingNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TrendingNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TrendingNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TrendingNotification interface. + */ +export function instanceOfTrendingNotification(value: object): value is TrendingNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TrendingNotificationFromJSON(json: any): TrendingNotification { + return TrendingNotificationFromJSONTyped(json, false); +} + +export function TrendingNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TrendingNotificationActionFromJSON)), + }; +} + +export function TrendingNotificationToJSON(value?: TrendingNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TrendingNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationAction.ts new file mode 100644 index 00000000000..5f15e2e0b59 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrendingNotificationActionData } from './TrendingNotificationActionData'; +import { + TrendingNotificationActionDataFromJSON, + TrendingNotificationActionDataFromJSONTyped, + TrendingNotificationActionDataToJSON, +} from './TrendingNotificationActionData'; + +/** + * + * @export + * @interface TrendingNotificationAction + */ +export interface TrendingNotificationAction { + /** + * + * @type {string} + * @memberof TrendingNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TrendingNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TrendingNotificationAction + */ + timestamp: number; + /** + * + * @type {TrendingNotificationActionData} + * @memberof TrendingNotificationAction + */ + data: TrendingNotificationActionData; +} + +/** + * Check if a given object implements the TrendingNotificationAction interface. + */ +export function instanceOfTrendingNotificationAction(value: object): value is TrendingNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TrendingNotificationActionFromJSON(json: any): TrendingNotificationAction { + return TrendingNotificationActionFromJSONTyped(json, false); +} + +export function TrendingNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TrendingNotificationActionDataFromJSON(json['data']), + }; +} + +export function TrendingNotificationActionToJSON(value?: TrendingNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TrendingNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationActionData.ts new file mode 100644 index 00000000000..d40d1ed4d90 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingNotificationActionData.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrendingNotificationActionData + */ +export interface TrendingNotificationActionData { + /** + * + * @type {number} + * @memberof TrendingNotificationActionData + */ + rank: number; + /** + * + * @type {string} + * @memberof TrendingNotificationActionData + */ + genre: string; + /** + * + * @type {string} + * @memberof TrendingNotificationActionData + */ + trackId: string; + /** + * + * @type {string} + * @memberof TrendingNotificationActionData + */ + timeRange: TrendingNotificationActionDataTimeRangeEnum; +} + + +/** + * @export + */ +export const TrendingNotificationActionDataTimeRangeEnum = { + Week: 'week', + Month: 'month', + Year: 'year' +} as const; +export type TrendingNotificationActionDataTimeRangeEnum = typeof TrendingNotificationActionDataTimeRangeEnum[keyof typeof TrendingNotificationActionDataTimeRangeEnum]; + + +/** + * Check if a given object implements the TrendingNotificationActionData interface. + */ +export function instanceOfTrendingNotificationActionData(value: object): value is TrendingNotificationActionData { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "timeRange" in value && value["timeRange"] !== undefined; + + return isInstance; +} + +export function TrendingNotificationActionDataFromJSON(json: any): TrendingNotificationActionData { + return TrendingNotificationActionDataFromJSONTyped(json, false); +} + +export function TrendingNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'genre': json['genre'], + 'trackId': json['track_id'], + 'timeRange': json['time_range'], + }; +} + +export function TrendingNotificationActionDataToJSON(value?: TrendingNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'genre': value.genre, + 'track_id': value.trackId, + 'time_range': value.timeRange, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotification.ts new file mode 100644 index 00000000000..306d21cefd4 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrendingPlaylistNotificationAction } from './TrendingPlaylistNotificationAction'; +import { + TrendingPlaylistNotificationActionFromJSON, + TrendingPlaylistNotificationActionFromJSONTyped, + TrendingPlaylistNotificationActionToJSON, +} from './TrendingPlaylistNotificationAction'; + +/** + * + * @export + * @interface TrendingPlaylistNotification + */ +export interface TrendingPlaylistNotification { + /** + * + * @type {string} + * @memberof TrendingPlaylistNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TrendingPlaylistNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TrendingPlaylistNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TrendingPlaylistNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TrendingPlaylistNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TrendingPlaylistNotification interface. + */ +export function instanceOfTrendingPlaylistNotification(value: object): value is TrendingPlaylistNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TrendingPlaylistNotificationFromJSON(json: any): TrendingPlaylistNotification { + return TrendingPlaylistNotificationFromJSONTyped(json, false); +} + +export function TrendingPlaylistNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingPlaylistNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TrendingPlaylistNotificationActionFromJSON)), + }; +} + +export function TrendingPlaylistNotificationToJSON(value?: TrendingPlaylistNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TrendingPlaylistNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationAction.ts new file mode 100644 index 00000000000..cc43a924646 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrendingPlaylistNotificationActionData } from './TrendingPlaylistNotificationActionData'; +import { + TrendingPlaylistNotificationActionDataFromJSON, + TrendingPlaylistNotificationActionDataFromJSONTyped, + TrendingPlaylistNotificationActionDataToJSON, +} from './TrendingPlaylistNotificationActionData'; + +/** + * + * @export + * @interface TrendingPlaylistNotificationAction + */ +export interface TrendingPlaylistNotificationAction { + /** + * + * @type {string} + * @memberof TrendingPlaylistNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TrendingPlaylistNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TrendingPlaylistNotificationAction + */ + timestamp: number; + /** + * + * @type {TrendingPlaylistNotificationActionData} + * @memberof TrendingPlaylistNotificationAction + */ + data: TrendingPlaylistNotificationActionData; +} + +/** + * Check if a given object implements the TrendingPlaylistNotificationAction interface. + */ +export function instanceOfTrendingPlaylistNotificationAction(value: object): value is TrendingPlaylistNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TrendingPlaylistNotificationActionFromJSON(json: any): TrendingPlaylistNotificationAction { + return TrendingPlaylistNotificationActionFromJSONTyped(json, false); +} + +export function TrendingPlaylistNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingPlaylistNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TrendingPlaylistNotificationActionDataFromJSON(json['data']), + }; +} + +export function TrendingPlaylistNotificationActionToJSON(value?: TrendingPlaylistNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TrendingPlaylistNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationActionData.ts new file mode 100644 index 00000000000..9fccfa5c777 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistNotificationActionData.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrendingPlaylistNotificationActionData + */ +export interface TrendingPlaylistNotificationActionData { + /** + * + * @type {number} + * @memberof TrendingPlaylistNotificationActionData + */ + rank: number; + /** + * + * @type {string} + * @memberof TrendingPlaylistNotificationActionData + */ + genre: string; + /** + * + * @type {string} + * @memberof TrendingPlaylistNotificationActionData + */ + playlistId: string; + /** + * + * @type {string} + * @memberof TrendingPlaylistNotificationActionData + */ + timeRange: TrendingPlaylistNotificationActionDataTimeRangeEnum; +} + + +/** + * @export + */ +export const TrendingPlaylistNotificationActionDataTimeRangeEnum = { + Week: 'week', + Month: 'month', + Year: 'year' +} as const; +export type TrendingPlaylistNotificationActionDataTimeRangeEnum = typeof TrendingPlaylistNotificationActionDataTimeRangeEnum[keyof typeof TrendingPlaylistNotificationActionDataTimeRangeEnum]; + + +/** + * Check if a given object implements the TrendingPlaylistNotificationActionData interface. + */ +export function instanceOfTrendingPlaylistNotificationActionData(value: object): value is TrendingPlaylistNotificationActionData { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + isInstance = isInstance && "timeRange" in value && value["timeRange"] !== undefined; + + return isInstance; +} + +export function TrendingPlaylistNotificationActionDataFromJSON(json: any): TrendingPlaylistNotificationActionData { + return TrendingPlaylistNotificationActionDataFromJSONTyped(json, false); +} + +export function TrendingPlaylistNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingPlaylistNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'genre': json['genre'], + 'playlistId': json['playlist_id'], + 'timeRange': json['time_range'], + }; +} + +export function TrendingPlaylistNotificationActionDataToJSON(value?: TrendingPlaylistNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'genre': value.genre, + 'playlist_id': value.playlistId, + 'time_range': value.timeRange, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotification.ts new file mode 100644 index 00000000000..db8d5aaac04 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrendingUndergroundNotificationAction } from './TrendingUndergroundNotificationAction'; +import { + TrendingUndergroundNotificationActionFromJSON, + TrendingUndergroundNotificationActionFromJSONTyped, + TrendingUndergroundNotificationActionToJSON, +} from './TrendingUndergroundNotificationAction'; + +/** + * + * @export + * @interface TrendingUndergroundNotification + */ +export interface TrendingUndergroundNotification { + /** + * + * @type {string} + * @memberof TrendingUndergroundNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TrendingUndergroundNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TrendingUndergroundNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TrendingUndergroundNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TrendingUndergroundNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TrendingUndergroundNotification interface. + */ +export function instanceOfTrendingUndergroundNotification(value: object): value is TrendingUndergroundNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TrendingUndergroundNotificationFromJSON(json: any): TrendingUndergroundNotification { + return TrendingUndergroundNotificationFromJSONTyped(json, false); +} + +export function TrendingUndergroundNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingUndergroundNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TrendingUndergroundNotificationActionFromJSON)), + }; +} + +export function TrendingUndergroundNotificationToJSON(value?: TrendingUndergroundNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TrendingUndergroundNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationAction.ts new file mode 100644 index 00000000000..4862a9867fa --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrendingUndergroundNotificationActionData } from './TrendingUndergroundNotificationActionData'; +import { + TrendingUndergroundNotificationActionDataFromJSON, + TrendingUndergroundNotificationActionDataFromJSONTyped, + TrendingUndergroundNotificationActionDataToJSON, +} from './TrendingUndergroundNotificationActionData'; + +/** + * + * @export + * @interface TrendingUndergroundNotificationAction + */ +export interface TrendingUndergroundNotificationAction { + /** + * + * @type {string} + * @memberof TrendingUndergroundNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TrendingUndergroundNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TrendingUndergroundNotificationAction + */ + timestamp: number; + /** + * + * @type {TrendingUndergroundNotificationActionData} + * @memberof TrendingUndergroundNotificationAction + */ + data: TrendingUndergroundNotificationActionData; +} + +/** + * Check if a given object implements the TrendingUndergroundNotificationAction interface. + */ +export function instanceOfTrendingUndergroundNotificationAction(value: object): value is TrendingUndergroundNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TrendingUndergroundNotificationActionFromJSON(json: any): TrendingUndergroundNotificationAction { + return TrendingUndergroundNotificationActionFromJSONTyped(json, false); +} + +export function TrendingUndergroundNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingUndergroundNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TrendingUndergroundNotificationActionDataFromJSON(json['data']), + }; +} + +export function TrendingUndergroundNotificationActionToJSON(value?: TrendingUndergroundNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TrendingUndergroundNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationActionData.ts new file mode 100644 index 00000000000..b93ee67a8fb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingUndergroundNotificationActionData.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrendingUndergroundNotificationActionData + */ +export interface TrendingUndergroundNotificationActionData { + /** + * + * @type {number} + * @memberof TrendingUndergroundNotificationActionData + */ + rank: number; + /** + * + * @type {string} + * @memberof TrendingUndergroundNotificationActionData + */ + genre: string; + /** + * + * @type {string} + * @memberof TrendingUndergroundNotificationActionData + */ + trackId: string; + /** + * + * @type {string} + * @memberof TrendingUndergroundNotificationActionData + */ + timeRange: TrendingUndergroundNotificationActionDataTimeRangeEnum; +} + + +/** + * @export + */ +export const TrendingUndergroundNotificationActionDataTimeRangeEnum = { + Week: 'week', + Month: 'month', + Year: 'year' +} as const; +export type TrendingUndergroundNotificationActionDataTimeRangeEnum = typeof TrendingUndergroundNotificationActionDataTimeRangeEnum[keyof typeof TrendingUndergroundNotificationActionDataTimeRangeEnum]; + + +/** + * Check if a given object implements the TrendingUndergroundNotificationActionData interface. + */ +export function instanceOfTrendingUndergroundNotificationActionData(value: object): value is TrendingUndergroundNotificationActionData { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "timeRange" in value && value["timeRange"] !== undefined; + + return isInstance; +} + +export function TrendingUndergroundNotificationActionDataFromJSON(json: any): TrendingUndergroundNotificationActionData { + return TrendingUndergroundNotificationActionDataFromJSONTyped(json, false); +} + +export function TrendingUndergroundNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingUndergroundNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'genre': json['genre'], + 'trackId': json['track_id'], + 'timeRange': json['time_range'], + }; +} + +export function TrendingUndergroundNotificationActionDataToJSON(value?: TrendingUndergroundNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'genre': value.genre, + 'track_id': value.trackId, + 'time_range': value.timeRange, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UpdateCommentRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdateCommentRequest.ts new file mode 100644 index 00000000000..2c7f7b2e16e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdateCommentRequest.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UpdateCommentRequest + */ +export interface UpdateCommentRequest { + /** + * + * @type {string} + * @memberof UpdateCommentRequest + */ + body: string; +} + +/** + * Check if a given object implements the UpdateCommentRequest interface. + */ +export function instanceOfUpdateCommentRequest(value: object): value is UpdateCommentRequest { + let isInstance = true; + isInstance = isInstance && "body" in value && value["body"] !== undefined; + + return isInstance; +} + +export function UpdateCommentRequestFromJSON(json: any): UpdateCommentRequest { + return UpdateCommentRequestFromJSONTyped(json, false); +} + +export function UpdateCommentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCommentRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'body': json['body'], + }; +} + +export function UpdateCommentRequestToJSON(value?: UpdateCommentRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'body': value.body, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UpdateDeveloperAppRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdateDeveloperAppRequest.ts new file mode 100644 index 00000000000..f0bd7b77597 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdateDeveloperAppRequest.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UpdateDeveloperAppRequest + */ +export interface UpdateDeveloperAppRequest { + /** + * Developer app name + * @type {string} + * @memberof UpdateDeveloperAppRequest + */ + name: string; + /** + * App description + * @type {string} + * @memberof UpdateDeveloperAppRequest + */ + description: string; + /** + * App logo/image URL (camelCase) + * @type {string} + * @memberof UpdateDeveloperAppRequest + */ + imageUrl: string; +} + +/** + * Check if a given object implements the UpdateDeveloperAppRequest interface. + */ +export function instanceOfUpdateDeveloperAppRequest(value: object): value is UpdateDeveloperAppRequest { + let isInstance = true; + isInstance = isInstance && "name" in value && value["name"] !== undefined; + isInstance = isInstance && "description" in value && value["description"] !== undefined; + isInstance = isInstance && "imageUrl" in value && value["imageUrl"] !== undefined; + + return isInstance; +} + +export function UpdateDeveloperAppRequestFromJSON(json: any): UpdateDeveloperAppRequest { + return UpdateDeveloperAppRequestFromJSONTyped(json, false); +} + +export function UpdateDeveloperAppRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateDeveloperAppRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': json['description'], + 'imageUrl': json['imageUrl'], + }; +} + +export function UpdateDeveloperAppRequestToJSON(value?: UpdateDeveloperAppRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + 'imageUrl': value.imageUrl, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequest.ts new file mode 100644 index 00000000000..c8445624fe6 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequest.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UpdatePlaylistRequestPlaylistContentsInner } from './UpdatePlaylistRequestPlaylistContentsInner'; +import { + UpdatePlaylistRequestPlaylistContentsInnerFromJSON, + UpdatePlaylistRequestPlaylistContentsInnerFromJSONTyped, + UpdatePlaylistRequestPlaylistContentsInnerToJSON, +} from './UpdatePlaylistRequestPlaylistContentsInner'; + +/** + * Request body for updating playlist information. All fields are optional. + * @export + * @interface UpdatePlaylistRequest + */ +export interface UpdatePlaylistRequest { + /** + * Playlist or album name + * @type {string} + * @memberof UpdatePlaylistRequest + */ + playlistName?: string; + /** + * Playlist description + * @type {string} + * @memberof UpdatePlaylistRequest + */ + description?: string; + /** + * Whether the playlist is private + * @type {boolean} + * @memberof UpdatePlaylistRequest + */ + isPrivate?: boolean; + /** + * Array of track IDs to include in the playlist + * @type {Array} + * @memberof UpdatePlaylistRequest + */ + playlistContents?: Array; + /** + * URL for playlist artwork + * @type {string} + * @memberof UpdatePlaylistRequest + */ + artworkUrl?: string; + /** + * Universal Product Code (for albums) + * @type {string} + * @memberof UpdatePlaylistRequest + */ + upc?: string; +} + +/** + * Check if a given object implements the UpdatePlaylistRequest interface. + */ +export function instanceOfUpdatePlaylistRequest(value: object): value is UpdatePlaylistRequest { + let isInstance = true; + + return isInstance; +} + +export function UpdatePlaylistRequestFromJSON(json: any): UpdatePlaylistRequest { + return UpdatePlaylistRequestFromJSONTyped(json, false); +} + +export function UpdatePlaylistRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePlaylistRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'playlistName': !exists(json, 'playlist_name') ? undefined : json['playlist_name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'isPrivate': !exists(json, 'is_private') ? undefined : json['is_private'], + 'playlistContents': !exists(json, 'playlist_contents') ? undefined : ((json['playlist_contents'] as Array).map(UpdatePlaylistRequestPlaylistContentsInnerFromJSON)), + 'artworkUrl': !exists(json, 'artwork_url') ? undefined : json['artwork_url'], + 'upc': !exists(json, 'upc') ? undefined : json['upc'], + }; +} + +export function UpdatePlaylistRequestToJSON(value?: UpdatePlaylistRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'playlist_name': value.playlistName, + 'description': value.description, + 'is_private': value.isPrivate, + 'playlist_contents': value.playlistContents === undefined ? undefined : ((value.playlistContents as Array).map(UpdatePlaylistRequestPlaylistContentsInnerToJSON)), + 'artwork_url': value.artworkUrl, + 'upc': value.upc, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequestPlaylistContentsInner.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequestPlaylistContentsInner.ts new file mode 100644 index 00000000000..eface26eb93 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdatePlaylistRequestPlaylistContentsInner.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UpdatePlaylistRequestPlaylistContentsInner + */ +export interface UpdatePlaylistRequestPlaylistContentsInner { + /** + * Track ID to add + * @type {string} + * @memberof UpdatePlaylistRequestPlaylistContentsInner + */ + trackId?: string; + /** + * Unix timestamp when track was added + * @type {number} + * @memberof UpdatePlaylistRequestPlaylistContentsInner + */ + timestamp?: number; +} + +/** + * Check if a given object implements the UpdatePlaylistRequestPlaylistContentsInner interface. + */ +export function instanceOfUpdatePlaylistRequestPlaylistContentsInner(value: object): value is UpdatePlaylistRequestPlaylistContentsInner { + let isInstance = true; + + return isInstance; +} + +export function UpdatePlaylistRequestPlaylistContentsInnerFromJSON(json: any): UpdatePlaylistRequestPlaylistContentsInner { + return UpdatePlaylistRequestPlaylistContentsInnerFromJSONTyped(json, false); +} + +export function UpdatePlaylistRequestPlaylistContentsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePlaylistRequestPlaylistContentsInner { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': !exists(json, 'track_id') ? undefined : json['track_id'], + 'timestamp': !exists(json, 'timestamp') ? undefined : json['timestamp'], + }; +} + +export function UpdatePlaylistRequestPlaylistContentsInnerToJSON(value?: UpdatePlaylistRequestPlaylistContentsInner | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + 'timestamp': value.timestamp, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UpdateTrackRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdateTrackRequest.ts new file mode 100644 index 00000000000..56d4db40653 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdateTrackRequest.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * Request body for updating track information. All fields are optional. + * @export + * @interface UpdateTrackRequest + */ +export interface UpdateTrackRequest { + /** + * Track title + * @type {string} + * @memberof UpdateTrackRequest + */ + title?: string; + /** + * Track description + * @type {string} + * @memberof UpdateTrackRequest + */ + description?: string; + /** + * Track genre + * @type {string} + * @memberof UpdateTrackRequest + */ + genre?: string; + /** + * Track mood + * @type {string} + * @memberof UpdateTrackRequest + */ + mood?: string; + /** + * Comma-separated tags + * @type {string} + * @memberof UpdateTrackRequest + */ + tags?: string; + /** + * Track release date + * @type {Date} + * @memberof UpdateTrackRequest + */ + releaseDate?: Date; + /** + * International Standard Recording Code + * @type {string} + * @memberof UpdateTrackRequest + */ + isrc?: string; + /** + * Whether the track is downloadable + * @type {boolean} + * @memberof UpdateTrackRequest + */ + isDownloadable?: boolean; + /** + * Whether the original file is available + * @type {boolean} + * @memberof UpdateTrackRequest + */ + isOriginalAvailable?: boolean; + /** + * URL for track artwork + * @type {string} + * @memberof UpdateTrackRequest + */ + artworkUrl?: string; +} + +/** + * Check if a given object implements the UpdateTrackRequest interface. + */ +export function instanceOfUpdateTrackRequest(value: object): value is UpdateTrackRequest { + let isInstance = true; + + return isInstance; +} + +export function UpdateTrackRequestFromJSON(json: any): UpdateTrackRequest { + return UpdateTrackRequestFromJSONTyped(json, false); +} + +export function UpdateTrackRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateTrackRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'title': !exists(json, 'title') ? undefined : json['title'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'genre': !exists(json, 'genre') ? undefined : json['genre'], + 'mood': !exists(json, 'mood') ? undefined : json['mood'], + 'tags': !exists(json, 'tags') ? undefined : json['tags'], + 'releaseDate': !exists(json, 'release_date') ? undefined : (new Date(json['release_date'])), + 'isrc': !exists(json, 'isrc') ? undefined : json['isrc'], + 'isDownloadable': !exists(json, 'is_downloadable') ? undefined : json['is_downloadable'], + 'isOriginalAvailable': !exists(json, 'is_original_available') ? undefined : json['is_original_available'], + 'artworkUrl': !exists(json, 'artwork_url') ? undefined : json['artwork_url'], + }; +} + +export function UpdateTrackRequestToJSON(value?: UpdateTrackRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'title': value.title, + 'description': value.description, + 'genre': value.genre, + 'mood': value.mood, + 'tags': value.tags, + 'release_date': value.releaseDate === undefined ? undefined : (value.releaseDate.toISOString()), + 'isrc': value.isrc, + 'is_downloadable': value.isDownloadable, + 'is_original_available': value.isOriginalAvailable, + 'artwork_url': value.artworkUrl, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequest.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequest.ts new file mode 100644 index 00000000000..08cafb3e3c0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequest.ts @@ -0,0 +1,194 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * Request body for updating user profile. All fields are optional. + * @export + * @interface UpdateUserRequest + */ +export interface UpdateUserRequest { + /** + * Display name + * @type {string} + * @memberof UpdateUserRequest + */ + name?: string; + /** + * User bio + * @type {string} + * @memberof UpdateUserRequest + */ + bio?: string; + /** + * User location + * @type {string} + * @memberof UpdateUserRequest + */ + location?: string; + /** + * Website URL + * @type {string} + * @memberof UpdateUserRequest + */ + website?: string; + /** + * Donation link + * @type {string} + * @memberof UpdateUserRequest + */ + donation?: string; + /** + * Twitter handle (without @) + * @type {string} + * @memberof UpdateUserRequest + */ + twitterHandle?: string; + /** + * Instagram handle (without @) + * @type {string} + * @memberof UpdateUserRequest + */ + instagramHandle?: string; + /** + * TikTok handle (without @) + * @type {string} + * @memberof UpdateUserRequest + */ + tiktokHandle?: string; + /** + * Profile picture CID or URL + * @type {string} + * @memberof UpdateUserRequest + */ + profilePicture?: string; + /** + * Profile picture sizes metadata + * @type {string} + * @memberof UpdateUserRequest + */ + profilePictureSizes?: string; + /** + * Cover photo CID or URL + * @type {string} + * @memberof UpdateUserRequest + */ + coverPhoto?: string; + /** + * Cover photo sizes metadata + * @type {string} + * @memberof UpdateUserRequest + */ + coverPhotoSizes?: string; + /** + * Whether the user is deactivated + * @type {boolean} + * @memberof UpdateUserRequest + */ + isDeactivated?: boolean; + /** + * Track ID to feature as artist pick + * @type {string} + * @memberof UpdateUserRequest + */ + artistPickTrackId?: string; + /** + * Whether to allow AI attribution + * @type {boolean} + * @memberof UpdateUserRequest + */ + allowAiAttribution?: boolean; + /** + * Solana USDC payout wallet address + * @type {string} + * @memberof UpdateUserRequest + */ + splUsdcPayoutWallet?: string; + /** + * Coin flair mint address + * @type {string} + * @memberof UpdateUserRequest + */ + coinFlairMint?: string; +} + +/** + * Check if a given object implements the UpdateUserRequest interface. + */ +export function instanceOfUpdateUserRequest(value: object): value is UpdateUserRequest { + let isInstance = true; + + return isInstance; +} + +export function UpdateUserRequestFromJSON(json: any): UpdateUserRequest { + return UpdateUserRequestFromJSONTyped(json, false); +} + +export function UpdateUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': !exists(json, 'name') ? undefined : json['name'], + 'bio': !exists(json, 'bio') ? undefined : json['bio'], + 'location': !exists(json, 'location') ? undefined : json['location'], + 'website': !exists(json, 'website') ? undefined : json['website'], + 'donation': !exists(json, 'donation') ? undefined : json['donation'], + 'twitterHandle': !exists(json, 'twitter_handle') ? undefined : json['twitter_handle'], + 'instagramHandle': !exists(json, 'instagram_handle') ? undefined : json['instagram_handle'], + 'tiktokHandle': !exists(json, 'tiktok_handle') ? undefined : json['tiktok_handle'], + 'profilePicture': !exists(json, 'profile_picture') ? undefined : json['profile_picture'], + 'profilePictureSizes': !exists(json, 'profile_picture_sizes') ? undefined : json['profile_picture_sizes'], + 'coverPhoto': !exists(json, 'cover_photo') ? undefined : json['cover_photo'], + 'coverPhotoSizes': !exists(json, 'cover_photo_sizes') ? undefined : json['cover_photo_sizes'], + 'isDeactivated': !exists(json, 'is_deactivated') ? undefined : json['is_deactivated'], + 'artistPickTrackId': !exists(json, 'artist_pick_track_id') ? undefined : json['artist_pick_track_id'], + 'allowAiAttribution': !exists(json, 'allow_ai_attribution') ? undefined : json['allow_ai_attribution'], + 'splUsdcPayoutWallet': !exists(json, 'spl_usdc_payout_wallet') ? undefined : json['spl_usdc_payout_wallet'], + 'coinFlairMint': !exists(json, 'coin_flair_mint') ? undefined : json['coin_flair_mint'], + }; +} + +export function UpdateUserRequestToJSON(value?: UpdateUserRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'bio': value.bio, + 'location': value.location, + 'website': value.website, + 'donation': value.donation, + 'twitter_handle': value.twitterHandle, + 'instagram_handle': value.instagramHandle, + 'tiktok_handle': value.tiktokHandle, + 'profile_picture': value.profilePicture, + 'profile_picture_sizes': value.profilePictureSizes, + 'cover_photo': value.coverPhoto, + 'cover_photo_sizes': value.coverPhotoSizes, + 'is_deactivated': value.isDeactivated, + 'artist_pick_track_id': value.artistPickTrackId, + 'allow_ai_attribution': value.allowAiAttribution, + 'spl_usdc_payout_wallet': value.splUsdcPayoutWallet, + 'coin_flair_mint': value.coinFlairMint, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts b/packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts new file mode 100644 index 00000000000..189a2324136 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UrlWithMirrors + */ +export interface UrlWithMirrors { + /** + * + * @type {string} + * @memberof UrlWithMirrors + */ + url?: string; + /** + * + * @type {Array} + * @memberof UrlWithMirrors + */ + mirrors: Array; +} + +/** + * Check if a given object implements the UrlWithMirrors interface. + */ +export function instanceOfUrlWithMirrors(value: object): value is UrlWithMirrors { + let isInstance = true; + isInstance = isInstance && "mirrors" in value && value["mirrors"] !== undefined; + + return isInstance; +} + +export function UrlWithMirrorsFromJSON(json: any): UrlWithMirrors { + return UrlWithMirrorsFromJSONTyped(json, false); +} + +export function UrlWithMirrorsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UrlWithMirrors { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'url': !exists(json, 'url') ? undefined : json['url'], + 'mirrors': json['mirrors'], + }; +} + +export function UrlWithMirrorsToJSON(value?: UrlWithMirrors | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'url': value.url, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotification.ts new file mode 100644 index 00000000000..cfc61884ea3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UsdcPurchaseBuyerNotificationAction } from './UsdcPurchaseBuyerNotificationAction'; +import { + UsdcPurchaseBuyerNotificationActionFromJSON, + UsdcPurchaseBuyerNotificationActionFromJSONTyped, + UsdcPurchaseBuyerNotificationActionToJSON, +} from './UsdcPurchaseBuyerNotificationAction'; + +/** + * + * @export + * @interface UsdcPurchaseBuyerNotification + */ +export interface UsdcPurchaseBuyerNotification { + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotification + */ + type: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof UsdcPurchaseBuyerNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof UsdcPurchaseBuyerNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof UsdcPurchaseBuyerNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the UsdcPurchaseBuyerNotification interface. + */ +export function instanceOfUsdcPurchaseBuyerNotification(value: object): value is UsdcPurchaseBuyerNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function UsdcPurchaseBuyerNotificationFromJSON(json: any): UsdcPurchaseBuyerNotification { + return UsdcPurchaseBuyerNotificationFromJSONTyped(json, false); +} + +export function UsdcPurchaseBuyerNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcPurchaseBuyerNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(UsdcPurchaseBuyerNotificationActionFromJSON)), + }; +} + +export function UsdcPurchaseBuyerNotificationToJSON(value?: UsdcPurchaseBuyerNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(UsdcPurchaseBuyerNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationAction.ts new file mode 100644 index 00000000000..1c54ab65939 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UsdcPurchaseBuyerNotificationActionData } from './UsdcPurchaseBuyerNotificationActionData'; +import { + UsdcPurchaseBuyerNotificationActionDataFromJSON, + UsdcPurchaseBuyerNotificationActionDataFromJSONTyped, + UsdcPurchaseBuyerNotificationActionDataToJSON, +} from './UsdcPurchaseBuyerNotificationActionData'; + +/** + * + * @export + * @interface UsdcPurchaseBuyerNotificationAction + */ +export interface UsdcPurchaseBuyerNotificationAction { + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof UsdcPurchaseBuyerNotificationAction + */ + timestamp: number; + /** + * + * @type {UsdcPurchaseBuyerNotificationActionData} + * @memberof UsdcPurchaseBuyerNotificationAction + */ + data: UsdcPurchaseBuyerNotificationActionData; +} + +/** + * Check if a given object implements the UsdcPurchaseBuyerNotificationAction interface. + */ +export function instanceOfUsdcPurchaseBuyerNotificationAction(value: object): value is UsdcPurchaseBuyerNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function UsdcPurchaseBuyerNotificationActionFromJSON(json: any): UsdcPurchaseBuyerNotificationAction { + return UsdcPurchaseBuyerNotificationActionFromJSONTyped(json, false); +} + +export function UsdcPurchaseBuyerNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcPurchaseBuyerNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': UsdcPurchaseBuyerNotificationActionDataFromJSON(json['data']), + }; +} + +export function UsdcPurchaseBuyerNotificationActionToJSON(value?: UsdcPurchaseBuyerNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': UsdcPurchaseBuyerNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationActionData.ts new file mode 100644 index 00000000000..4743c664d11 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseBuyerNotificationActionData.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UsdcPurchaseBuyerNotificationActionData + */ +export interface UsdcPurchaseBuyerNotificationActionData { + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationActionData + */ + contentType: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationActionData + */ + buyerUserId: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationActionData + */ + sellerUserId: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationActionData + */ + extraAmount: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseBuyerNotificationActionData + */ + contentId: string; +} + +/** + * Check if a given object implements the UsdcPurchaseBuyerNotificationActionData interface. + */ +export function instanceOfUsdcPurchaseBuyerNotificationActionData(value: object): value is UsdcPurchaseBuyerNotificationActionData { + let isInstance = true; + isInstance = isInstance && "contentType" in value && value["contentType"] !== undefined; + isInstance = isInstance && "buyerUserId" in value && value["buyerUserId"] !== undefined; + isInstance = isInstance && "sellerUserId" in value && value["sellerUserId"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "extraAmount" in value && value["extraAmount"] !== undefined; + isInstance = isInstance && "contentId" in value && value["contentId"] !== undefined; + + return isInstance; +} + +export function UsdcPurchaseBuyerNotificationActionDataFromJSON(json: any): UsdcPurchaseBuyerNotificationActionData { + return UsdcPurchaseBuyerNotificationActionDataFromJSONTyped(json, false); +} + +export function UsdcPurchaseBuyerNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcPurchaseBuyerNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'contentType': json['content_type'], + 'buyerUserId': json['buyer_user_id'], + 'sellerUserId': json['seller_user_id'], + 'amount': json['amount'], + 'extraAmount': json['extra_amount'], + 'contentId': json['content_id'], + }; +} + +export function UsdcPurchaseBuyerNotificationActionDataToJSON(value?: UsdcPurchaseBuyerNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'content_type': value.contentType, + 'buyer_user_id': value.buyerUserId, + 'seller_user_id': value.sellerUserId, + 'amount': value.amount, + 'extra_amount': value.extraAmount, + 'content_id': value.contentId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotification.ts new file mode 100644 index 00000000000..928fc75fe23 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UsdcPurchaseSellerNotificationAction } from './UsdcPurchaseSellerNotificationAction'; +import { + UsdcPurchaseSellerNotificationActionFromJSON, + UsdcPurchaseSellerNotificationActionFromJSONTyped, + UsdcPurchaseSellerNotificationActionToJSON, +} from './UsdcPurchaseSellerNotificationAction'; + +/** + * + * @export + * @interface UsdcPurchaseSellerNotification + */ +export interface UsdcPurchaseSellerNotification { + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotification + */ + type: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof UsdcPurchaseSellerNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof UsdcPurchaseSellerNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof UsdcPurchaseSellerNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the UsdcPurchaseSellerNotification interface. + */ +export function instanceOfUsdcPurchaseSellerNotification(value: object): value is UsdcPurchaseSellerNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function UsdcPurchaseSellerNotificationFromJSON(json: any): UsdcPurchaseSellerNotification { + return UsdcPurchaseSellerNotificationFromJSONTyped(json, false); +} + +export function UsdcPurchaseSellerNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcPurchaseSellerNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(UsdcPurchaseSellerNotificationActionFromJSON)), + }; +} + +export function UsdcPurchaseSellerNotificationToJSON(value?: UsdcPurchaseSellerNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(UsdcPurchaseSellerNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationAction.ts new file mode 100644 index 00000000000..9ea49b84695 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UsdcPurchaseSellerNotificationActionData } from './UsdcPurchaseSellerNotificationActionData'; +import { + UsdcPurchaseSellerNotificationActionDataFromJSON, + UsdcPurchaseSellerNotificationActionDataFromJSONTyped, + UsdcPurchaseSellerNotificationActionDataToJSON, +} from './UsdcPurchaseSellerNotificationActionData'; + +/** + * + * @export + * @interface UsdcPurchaseSellerNotificationAction + */ +export interface UsdcPurchaseSellerNotificationAction { + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof UsdcPurchaseSellerNotificationAction + */ + timestamp: number; + /** + * + * @type {UsdcPurchaseSellerNotificationActionData} + * @memberof UsdcPurchaseSellerNotificationAction + */ + data: UsdcPurchaseSellerNotificationActionData; +} + +/** + * Check if a given object implements the UsdcPurchaseSellerNotificationAction interface. + */ +export function instanceOfUsdcPurchaseSellerNotificationAction(value: object): value is UsdcPurchaseSellerNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function UsdcPurchaseSellerNotificationActionFromJSON(json: any): UsdcPurchaseSellerNotificationAction { + return UsdcPurchaseSellerNotificationActionFromJSONTyped(json, false); +} + +export function UsdcPurchaseSellerNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcPurchaseSellerNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': UsdcPurchaseSellerNotificationActionDataFromJSON(json['data']), + }; +} + +export function UsdcPurchaseSellerNotificationActionToJSON(value?: UsdcPurchaseSellerNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': UsdcPurchaseSellerNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationActionData.ts new file mode 100644 index 00000000000..2839a5db7ad --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcPurchaseSellerNotificationActionData.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UsdcPurchaseSellerNotificationActionData + */ +export interface UsdcPurchaseSellerNotificationActionData { + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationActionData + */ + contentType: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationActionData + */ + buyerUserId: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationActionData + */ + sellerUserId: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationActionData + */ + extraAmount: string; + /** + * + * @type {string} + * @memberof UsdcPurchaseSellerNotificationActionData + */ + contentId: string; +} + +/** + * Check if a given object implements the UsdcPurchaseSellerNotificationActionData interface. + */ +export function instanceOfUsdcPurchaseSellerNotificationActionData(value: object): value is UsdcPurchaseSellerNotificationActionData { + let isInstance = true; + isInstance = isInstance && "contentType" in value && value["contentType"] !== undefined; + isInstance = isInstance && "buyerUserId" in value && value["buyerUserId"] !== undefined; + isInstance = isInstance && "sellerUserId" in value && value["sellerUserId"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "extraAmount" in value && value["extraAmount"] !== undefined; + isInstance = isInstance && "contentId" in value && value["contentId"] !== undefined; + + return isInstance; +} + +export function UsdcPurchaseSellerNotificationActionDataFromJSON(json: any): UsdcPurchaseSellerNotificationActionData { + return UsdcPurchaseSellerNotificationActionDataFromJSONTyped(json, false); +} + +export function UsdcPurchaseSellerNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcPurchaseSellerNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'contentType': json['content_type'], + 'buyerUserId': json['buyer_user_id'], + 'sellerUserId': json['seller_user_id'], + 'amount': json['amount'], + 'extraAmount': json['extra_amount'], + 'contentId': json['content_id'], + }; +} + +export function UsdcPurchaseSellerNotificationActionDataToJSON(value?: UsdcPurchaseSellerNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'content_type': value.contentType, + 'buyer_user_id': value.buyerUserId, + 'seller_user_id': value.sellerUserId, + 'amount': value.amount, + 'extra_amount': value.extraAmount, + 'content_id': value.contentId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserAccountResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/UserAccountResponseFull.ts new file mode 100644 index 00000000000..382a2b8d351 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserAccountResponseFull.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { AccountFull } from './AccountFull'; +import { + AccountFullFromJSON, + AccountFullFromJSONTyped, + AccountFullToJSON, +} from './AccountFull'; + +/** + * + * @export + * @interface UserAccountResponseFull + */ +export interface UserAccountResponseFull { + /** + * + * @type {AccountFull} + * @memberof UserAccountResponseFull + */ + data?: AccountFull; +} + +/** + * Check if a given object implements the UserAccountResponseFull interface. + */ +export function instanceOfUserAccountResponseFull(value: object): value is UserAccountResponseFull { + let isInstance = true; + + return isInstance; +} + +export function UserAccountResponseFullFromJSON(json: any): UserAccountResponseFull { + return UserAccountResponseFullFromJSONTyped(json, false); +} + +export function UserAccountResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAccountResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : AccountFullFromJSON(json['data']), + }; +} + +export function UserAccountResponseFullToJSON(value?: UserAccountResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': AccountFullToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserFeedItem.ts b/packages/sdk/src/sdk/api/generated/default/models/UserFeedItem.ts new file mode 100644 index 00000000000..92849b2e51e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserFeedItem.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { + PlaylistFeedItem, + instanceOfPlaylistFeedItem, + PlaylistFeedItemFromJSON, + PlaylistFeedItemFromJSONTyped, + PlaylistFeedItemToJSON, +} from './PlaylistFeedItem'; +import { + TrackFeedItem, + instanceOfTrackFeedItem, + TrackFeedItemFromJSON, + TrackFeedItemFromJSONTyped, + TrackFeedItemToJSON, +} from './TrackFeedItem'; + +/** + * @type UserFeedItem + * + * @export + */ +export type UserFeedItem = { type: 'playlist' } & PlaylistFeedItem | { type: 'track' } & TrackFeedItem; + +export function UserFeedItemFromJSON(json: any): UserFeedItem { + return UserFeedItemFromJSONTyped(json, false); +} + +export function UserFeedItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFeedItem { + if ((json === undefined) || (json === null)) { + return json; + } + switch (json['type']) { + case 'playlist': + return {...PlaylistFeedItemFromJSONTyped(json, true), type: 'playlist'}; + case 'track': + return {...TrackFeedItemFromJSONTyped(json, true), type: 'track'}; + default: + throw new Error(`No variant of UserFeedItem exists with 'type=${json['type']}'`); + } +} + +export function UserFeedItemToJSON(value?: UserFeedItem | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + switch (value['type']) { + case 'playlist': + return PlaylistFeedItemToJSON(value); + case 'track': + return TrackFeedItemToJSON(value); + default: + throw new Error(`No variant of UserFeedItem exists with 'type=${value['type']}'`); + } + +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserFeedResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/UserFeedResponse.ts new file mode 100644 index 00000000000..246fb55e2be --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserFeedResponse.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserFeedItem } from './UserFeedItem'; +import { + UserFeedItemFromJSON, + UserFeedItemFromJSONTyped, + UserFeedItemToJSON, +} from './UserFeedItem'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface UserFeedResponse + */ +export interface UserFeedResponse { + /** + * + * @type {number} + * @memberof UserFeedResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof UserFeedResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof UserFeedResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof UserFeedResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof UserFeedResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof UserFeedResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof UserFeedResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof UserFeedResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the UserFeedResponse interface. + */ +export function instanceOfUserFeedResponse(value: object): value is UserFeedResponse { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function UserFeedResponseFromJSON(json: any): UserFeedResponse { + return UserFeedResponseFromJSONTyped(json, false); +} + +export function UserFeedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFeedResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(UserFeedItemFromJSON)), + }; +} + +export function UserFeedResponseToJSON(value?: UserFeedResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(UserFeedItemToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserFull.ts b/packages/sdk/src/sdk/api/generated/default/models/UserFull.ts new file mode 100644 index 00000000000..2d78ae36dd9 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserFull.ts @@ -0,0 +1,614 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CoverPhoto } from './CoverPhoto'; +import { + CoverPhotoFromJSON, + CoverPhotoFromJSONTyped, + CoverPhotoToJSON, +} from './CoverPhoto'; +import type { CoverPhotoFull } from './CoverPhotoFull'; +import { + CoverPhotoFullFromJSON, + CoverPhotoFullFromJSONTyped, + CoverPhotoFullToJSON, +} from './CoverPhotoFull'; +import type { PlaylistLibrary } from './PlaylistLibrary'; +import { + PlaylistLibraryFromJSON, + PlaylistLibraryFromJSONTyped, + PlaylistLibraryToJSON, +} from './PlaylistLibrary'; +import type { ProfilePicture } from './ProfilePicture'; +import { + ProfilePictureFromJSON, + ProfilePictureFromJSONTyped, + ProfilePictureToJSON, +} from './ProfilePicture'; +import type { ProfilePictureFull } from './ProfilePictureFull'; +import { + ProfilePictureFullFromJSON, + ProfilePictureFullFromJSONTyped, + ProfilePictureFullToJSON, +} from './ProfilePictureFull'; +import type { UserFullArtistCoinBadge } from './UserFullArtistCoinBadge'; +import { + UserFullArtistCoinBadgeFromJSON, + UserFullArtistCoinBadgeFromJSONTyped, + UserFullArtistCoinBadgeToJSON, +} from './UserFullArtistCoinBadge'; + +/** + * + * @export + * @interface UserFull + */ +export interface UserFull { + /** + * + * @type {number} + * @memberof UserFull + */ + albumCount: number; + /** + * + * @type {string} + * @memberof UserFull + */ + artistPickTrackId?: string; + /** + * + * @type {UserFullArtistCoinBadge} + * @memberof UserFull + */ + artistCoinBadge: UserFullArtistCoinBadge; + /** + * + * @type {string} + * @memberof UserFull + */ + coinFlairMint?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + bio?: string; + /** + * + * @type {CoverPhotoFull} + * @memberof UserFull + */ + coverPhoto?: CoverPhotoFull; + /** + * + * @type {number} + * @memberof UserFull + */ + followeeCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + followerCount: number; + /** + * + * @type {string} + * @memberof UserFull + */ + handle: string; + /** + * + * @type {string} + * @memberof UserFull + */ + id: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isVerified: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + twitterHandle?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + instagramHandle?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + tiktokHandle?: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + verifiedWithTwitter: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + verifiedWithInstagram: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + verifiedWithTiktok: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + website?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + donation?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + location?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + name: string; + /** + * + * @type {number} + * @memberof UserFull + */ + playlistCount: number; + /** + * + * @type {ProfilePictureFull} + * @memberof UserFull + */ + profilePicture?: ProfilePictureFull; + /** + * + * @type {number} + * @memberof UserFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + trackCount: number; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isDeactivated: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isAvailable: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + ercWallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + splWallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + splUsdcWallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + splUsdcPayoutWallet?: string; + /** + * + * @type {number} + * @memberof UserFull + */ + supporterCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + supportingCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + totalAudioBalance: number; + /** + * The user's Ethereum wallet address for their account + * @type {string} + * @memberof UserFull + */ + wallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + balance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + associatedWalletsBalance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + totalBalance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + waudioBalance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + associatedSolWalletsBalance: string; + /** + * + * @type {number} + * @memberof UserFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof UserFull + */ + createdAt: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isStorageV2: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + creatorNodeEndpoint?: string; + /** + * + * @type {number} + * @memberof UserFull + */ + currentUserFolloweeFollowCount: number; + /** + * + * @type {boolean} + * @memberof UserFull + */ + doesCurrentUserFollow: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + doesCurrentUserSubscribe: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + doesFollowCurrentUser: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + handleLc: string; + /** + * + * @type {string} + * @memberof UserFull + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof UserFull + */ + coverPhotoSizes?: string; + /** + * + * @type {CoverPhoto} + * @memberof UserFull + */ + coverPhotoCids?: CoverPhoto; + /** + * + * @type {string} + * @memberof UserFull + */ + coverPhotoLegacy?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + profilePictureSizes?: string; + /** + * + * @type {ProfilePicture} + * @memberof UserFull + */ + profilePictureCids?: ProfilePicture; + /** + * + * @type {string} + * @memberof UserFull + */ + profilePictureLegacy?: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + hasCollectibles: boolean; + /** + * + * @type {PlaylistLibrary} + * @memberof UserFull + */ + playlistLibrary?: PlaylistLibrary; + /** + * + * @type {boolean} + * @memberof UserFull + */ + allowAiAttribution: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + profileType?: string; +} + +/** + * Check if a given object implements the UserFull interface. + */ +export function instanceOfUserFull(value: object): value is UserFull { + let isInstance = true; + isInstance = isInstance && "albumCount" in value && value["albumCount"] !== undefined; + isInstance = isInstance && "artistCoinBadge" in value && value["artistCoinBadge"] !== undefined; + isInstance = isInstance && "followeeCount" in value && value["followeeCount"] !== undefined; + isInstance = isInstance && "followerCount" in value && value["followerCount"] !== undefined; + isInstance = isInstance && "handle" in value && value["handle"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isVerified" in value && value["isVerified"] !== undefined; + isInstance = isInstance && "verifiedWithTwitter" in value && value["verifiedWithTwitter"] !== undefined; + isInstance = isInstance && "verifiedWithInstagram" in value && value["verifiedWithInstagram"] !== undefined; + isInstance = isInstance && "verifiedWithTiktok" in value && value["verifiedWithTiktok"] !== undefined; + isInstance = isInstance && "name" in value && value["name"] !== undefined; + isInstance = isInstance && "playlistCount" in value && value["playlistCount"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "isDeactivated" in value && value["isDeactivated"] !== undefined; + isInstance = isInstance && "isAvailable" in value && value["isAvailable"] !== undefined; + isInstance = isInstance && "ercWallet" in value && value["ercWallet"] !== undefined; + isInstance = isInstance && "splWallet" in value && value["splWallet"] !== undefined; + isInstance = isInstance && "splUsdcWallet" in value && value["splUsdcWallet"] !== undefined; + isInstance = isInstance && "supporterCount" in value && value["supporterCount"] !== undefined; + isInstance = isInstance && "supportingCount" in value && value["supportingCount"] !== undefined; + isInstance = isInstance && "totalAudioBalance" in value && value["totalAudioBalance"] !== undefined; + isInstance = isInstance && "wallet" in value && value["wallet"] !== undefined; + isInstance = isInstance && "balance" in value && value["balance"] !== undefined; + isInstance = isInstance && "associatedWalletsBalance" in value && value["associatedWalletsBalance"] !== undefined; + isInstance = isInstance && "totalBalance" in value && value["totalBalance"] !== undefined; + isInstance = isInstance && "waudioBalance" in value && value["waudioBalance"] !== undefined; + isInstance = isInstance && "associatedSolWalletsBalance" in value && value["associatedSolWalletsBalance"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "isStorageV2" in value && value["isStorageV2"] !== undefined; + isInstance = isInstance && "currentUserFolloweeFollowCount" in value && value["currentUserFolloweeFollowCount"] !== undefined; + isInstance = isInstance && "doesCurrentUserFollow" in value && value["doesCurrentUserFollow"] !== undefined; + isInstance = isInstance && "doesCurrentUserSubscribe" in value && value["doesCurrentUserSubscribe"] !== undefined; + isInstance = isInstance && "doesFollowCurrentUser" in value && value["doesFollowCurrentUser"] !== undefined; + isInstance = isInstance && "handleLc" in value && value["handleLc"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "hasCollectibles" in value && value["hasCollectibles"] !== undefined; + isInstance = isInstance && "allowAiAttribution" in value && value["allowAiAttribution"] !== undefined; + + return isInstance; +} + +export function UserFullFromJSON(json: any): UserFull { + return UserFullFromJSONTyped(json, false); +} + +export function UserFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'albumCount': json['album_count'], + 'artistPickTrackId': !exists(json, 'artist_pick_track_id') ? undefined : json['artist_pick_track_id'], + 'artistCoinBadge': UserFullArtistCoinBadgeFromJSON(json['artist_coin_badge']), + 'coinFlairMint': !exists(json, 'coin_flair_mint') ? undefined : json['coin_flair_mint'], + 'bio': !exists(json, 'bio') ? undefined : json['bio'], + 'coverPhoto': !exists(json, 'cover_photo') ? undefined : CoverPhotoFullFromJSON(json['cover_photo']), + 'followeeCount': json['followee_count'], + 'followerCount': json['follower_count'], + 'handle': json['handle'], + 'id': json['id'], + 'isVerified': json['is_verified'], + 'twitterHandle': !exists(json, 'twitter_handle') ? undefined : json['twitter_handle'], + 'instagramHandle': !exists(json, 'instagram_handle') ? undefined : json['instagram_handle'], + 'tiktokHandle': !exists(json, 'tiktok_handle') ? undefined : json['tiktok_handle'], + 'verifiedWithTwitter': json['verified_with_twitter'], + 'verifiedWithInstagram': json['verified_with_instagram'], + 'verifiedWithTiktok': json['verified_with_tiktok'], + 'website': !exists(json, 'website') ? undefined : json['website'], + 'donation': !exists(json, 'donation') ? undefined : json['donation'], + 'location': !exists(json, 'location') ? undefined : json['location'], + 'name': json['name'], + 'playlistCount': json['playlist_count'], + 'profilePicture': !exists(json, 'profile_picture') ? undefined : ProfilePictureFullFromJSON(json['profile_picture']), + 'repostCount': json['repost_count'], + 'trackCount': json['track_count'], + 'isDeactivated': json['is_deactivated'], + 'isAvailable': json['is_available'], + 'ercWallet': json['erc_wallet'], + 'splWallet': json['spl_wallet'], + 'splUsdcWallet': json['spl_usdc_wallet'], + 'splUsdcPayoutWallet': !exists(json, 'spl_usdc_payout_wallet') ? undefined : json['spl_usdc_payout_wallet'], + 'supporterCount': json['supporter_count'], + 'supportingCount': json['supporting_count'], + 'totalAudioBalance': json['total_audio_balance'], + 'wallet': json['wallet'], + 'balance': json['balance'], + 'associatedWalletsBalance': json['associated_wallets_balance'], + 'totalBalance': json['total_balance'], + 'waudioBalance': json['waudio_balance'], + 'associatedSolWalletsBalance': json['associated_sol_wallets_balance'], + 'blocknumber': json['blocknumber'], + 'createdAt': json['created_at'], + 'isStorageV2': json['is_storage_v2'], + 'creatorNodeEndpoint': !exists(json, 'creator_node_endpoint') ? undefined : json['creator_node_endpoint'], + 'currentUserFolloweeFollowCount': json['current_user_followee_follow_count'], + 'doesCurrentUserFollow': json['does_current_user_follow'], + 'doesCurrentUserSubscribe': json['does_current_user_subscribe'], + 'doesFollowCurrentUser': json['does_follow_current_user'], + 'handleLc': json['handle_lc'], + 'updatedAt': json['updated_at'], + 'coverPhotoSizes': !exists(json, 'cover_photo_sizes') ? undefined : json['cover_photo_sizes'], + 'coverPhotoCids': !exists(json, 'cover_photo_cids') ? undefined : CoverPhotoFromJSON(json['cover_photo_cids']), + 'coverPhotoLegacy': !exists(json, 'cover_photo_legacy') ? undefined : json['cover_photo_legacy'], + 'profilePictureSizes': !exists(json, 'profile_picture_sizes') ? undefined : json['profile_picture_sizes'], + 'profilePictureCids': !exists(json, 'profile_picture_cids') ? undefined : ProfilePictureFromJSON(json['profile_picture_cids']), + 'profilePictureLegacy': !exists(json, 'profile_picture_legacy') ? undefined : json['profile_picture_legacy'], + 'hasCollectibles': json['has_collectibles'], + 'playlistLibrary': !exists(json, 'playlist_library') ? undefined : PlaylistLibraryFromJSON(json['playlist_library']), + 'allowAiAttribution': json['allow_ai_attribution'], + 'profileType': !exists(json, 'profile_type') ? undefined : json['profile_type'], + }; +} + +export function UserFullToJSON(value?: UserFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'album_count': value.albumCount, + 'artist_pick_track_id': value.artistPickTrackId, + 'artist_coin_badge': UserFullArtistCoinBadgeToJSON(value.artistCoinBadge), + 'coin_flair_mint': value.coinFlairMint, + 'bio': value.bio, + 'cover_photo': CoverPhotoFullToJSON(value.coverPhoto), + 'followee_count': value.followeeCount, + 'follower_count': value.followerCount, + 'handle': value.handle, + 'id': value.id, + 'is_verified': value.isVerified, + 'twitter_handle': value.twitterHandle, + 'instagram_handle': value.instagramHandle, + 'tiktok_handle': value.tiktokHandle, + 'verified_with_twitter': value.verifiedWithTwitter, + 'verified_with_instagram': value.verifiedWithInstagram, + 'verified_with_tiktok': value.verifiedWithTiktok, + 'website': value.website, + 'donation': value.donation, + 'location': value.location, + 'name': value.name, + 'playlist_count': value.playlistCount, + 'profile_picture': ProfilePictureFullToJSON(value.profilePicture), + 'repost_count': value.repostCount, + 'track_count': value.trackCount, + 'is_deactivated': value.isDeactivated, + 'is_available': value.isAvailable, + 'erc_wallet': value.ercWallet, + 'spl_wallet': value.splWallet, + 'spl_usdc_wallet': value.splUsdcWallet, + 'spl_usdc_payout_wallet': value.splUsdcPayoutWallet, + 'supporter_count': value.supporterCount, + 'supporting_count': value.supportingCount, + 'total_audio_balance': value.totalAudioBalance, + 'wallet': value.wallet, + 'balance': value.balance, + 'associated_wallets_balance': value.associatedWalletsBalance, + 'total_balance': value.totalBalance, + 'waudio_balance': value.waudioBalance, + 'associated_sol_wallets_balance': value.associatedSolWalletsBalance, + 'blocknumber': value.blocknumber, + 'created_at': value.createdAt, + 'is_storage_v2': value.isStorageV2, + 'creator_node_endpoint': value.creatorNodeEndpoint, + 'current_user_followee_follow_count': value.currentUserFolloweeFollowCount, + 'does_current_user_follow': value.doesCurrentUserFollow, + 'does_current_user_subscribe': value.doesCurrentUserSubscribe, + 'does_follow_current_user': value.doesFollowCurrentUser, + 'handle_lc': value.handleLc, + 'updated_at': value.updatedAt, + 'cover_photo_sizes': value.coverPhotoSizes, + 'cover_photo_cids': CoverPhotoToJSON(value.coverPhotoCids), + 'cover_photo_legacy': value.coverPhotoLegacy, + 'profile_picture_sizes': value.profilePictureSizes, + 'profile_picture_cids': ProfilePictureToJSON(value.profilePictureCids), + 'profile_picture_legacy': value.profilePictureLegacy, + 'has_collectibles': value.hasCollectibles, + 'playlist_library': PlaylistLibraryToJSON(value.playlistLibrary), + 'allow_ai_attribution': value.allowAiAttribution, + 'profile_type': value.profileType, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserFullArtistCoinBadge.ts b/packages/sdk/src/sdk/api/generated/default/models/UserFullArtistCoinBadge.ts new file mode 100644 index 00000000000..32bff248377 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserFullArtistCoinBadge.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserFullArtistCoinBadge + */ +export interface UserFullArtistCoinBadge { + /** + * + * @type {string} + * @memberof UserFullArtistCoinBadge + */ + mint?: string; + /** + * + * @type {string} + * @memberof UserFullArtistCoinBadge + */ + logoUri?: string; + /** + * + * @type {string} + * @memberof UserFullArtistCoinBadge + */ + bannerImageUrl?: string; + /** + * The coin symbol/ticker + * @type {string} + * @memberof UserFullArtistCoinBadge + */ + ticker?: string; +} + +/** + * Check if a given object implements the UserFullArtistCoinBadge interface. + */ +export function instanceOfUserFullArtistCoinBadge(value: object): value is UserFullArtistCoinBadge { + let isInstance = true; + + return isInstance; +} + +export function UserFullArtistCoinBadgeFromJSON(json: any): UserFullArtistCoinBadge { + return UserFullArtistCoinBadgeFromJSONTyped(json, false); +} + +export function UserFullArtistCoinBadgeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFullArtistCoinBadge { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'mint': !exists(json, 'mint') ? undefined : json['mint'], + 'logoUri': !exists(json, 'logo_uri') ? undefined : json['logo_uri'], + 'bannerImageUrl': !exists(json, 'banner_image_url') ? undefined : json['banner_image_url'], + 'ticker': !exists(json, 'ticker') ? undefined : json['ticker'], + }; +} + +export function UserFullArtistCoinBadgeToJSON(value?: UserFullArtistCoinBadge | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'mint': value.mint, + 'logo_uri': value.logoUri, + 'banner_image_url': value.bannerImageUrl, + 'ticker': value.ticker, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserManager.ts b/packages/sdk/src/sdk/api/generated/default/models/UserManager.ts new file mode 100644 index 00000000000..096d20e0a3a --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserManager.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Grant } from './Grant'; +import { + GrantFromJSON, + GrantFromJSONTyped, + GrantToJSON, +} from './Grant'; +import type { UserFull } from './UserFull'; +import { + UserFullFromJSON, + UserFullFromJSONTyped, + UserFullToJSON, +} from './UserFull'; + +/** + * + * @export + * @interface UserManager + */ +export interface UserManager { + /** + * + * @type {UserFull} + * @memberof UserManager + */ + manager: UserFull; + /** + * + * @type {Grant} + * @memberof UserManager + */ + grant: Grant; +} + +/** + * Check if a given object implements the UserManager interface. + */ +export function instanceOfUserManager(value: object): value is UserManager { + let isInstance = true; + isInstance = isInstance && "manager" in value && value["manager"] !== undefined; + isInstance = isInstance && "grant" in value && value["grant"] !== undefined; + + return isInstance; +} + +export function UserManagerFromJSON(json: any): UserManager { + return UserManagerFromJSONTyped(json, false); +} + +export function UserManagerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserManager { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'manager': UserFullFromJSON(json['manager']), + 'grant': GrantFromJSON(json['grant']), + }; +} + +export function UserManagerToJSON(value?: UserManager | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'manager': UserFullToJSON(value.manager), + 'grant': GrantToJSON(value.grant), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserMilestoneNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/UserMilestoneNotificationActionData.ts new file mode 100644 index 00000000000..707951aed86 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserMilestoneNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserMilestoneNotificationActionData + */ +export interface UserMilestoneNotificationActionData { + /** + * + * @type {string} + * @memberof UserMilestoneNotificationActionData + */ + type: string; + /** + * + * @type {number} + * @memberof UserMilestoneNotificationActionData + */ + threshold: number; + /** + * + * @type {string} + * @memberof UserMilestoneNotificationActionData + */ + userId: string; +} + +/** + * Check if a given object implements the UserMilestoneNotificationActionData interface. + */ +export function instanceOfUserMilestoneNotificationActionData(value: object): value is UserMilestoneNotificationActionData { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "threshold" in value && value["threshold"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + + return isInstance; +} + +export function UserMilestoneNotificationActionDataFromJSON(json: any): UserMilestoneNotificationActionData { + return UserMilestoneNotificationActionDataFromJSONTyped(json, false); +} + +export function UserMilestoneNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserMilestoneNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'threshold': json['threshold'], + 'userId': json['user_id'], + }; +} + +export function UserMilestoneNotificationActionDataToJSON(value?: UserMilestoneNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'threshold': value.threshold, + 'user_id': value.userId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserSubscribers.ts b/packages/sdk/src/sdk/api/generated/default/models/UserSubscribers.ts new file mode 100644 index 00000000000..84a52f2ed58 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserSubscribers.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserSubscribers + */ +export interface UserSubscribers { + /** + * + * @type {string} + * @memberof UserSubscribers + */ + userId: string; + /** + * + * @type {Array} + * @memberof UserSubscribers + */ + subscriberIds?: Array; +} + +/** + * Check if a given object implements the UserSubscribers interface. + */ +export function instanceOfUserSubscribers(value: object): value is UserSubscribers { + let isInstance = true; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + + return isInstance; +} + +export function UserSubscribersFromJSON(json: any): UserSubscribers { + return UserSubscribersFromJSONTyped(json, false); +} + +export function UserSubscribersFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSubscribers { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': json['user_id'], + 'subscriberIds': !exists(json, 'subscriber_ids') ? undefined : json['subscriber_ids'], + }; +} + +export function UserSubscribersToJSON(value?: UserSubscribers | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user_id': value.userId, + 'subscriber_ids': value.subscriberIds, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/VersionMetadata.ts b/packages/sdk/src/sdk/api/generated/default/models/VersionMetadata.ts new file mode 100644 index 00000000000..51ebb67c71c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/VersionMetadata.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface VersionMetadata + */ +export interface VersionMetadata { + /** + * + * @type {string} + * @memberof VersionMetadata + */ + service: string; + /** + * + * @type {string} + * @memberof VersionMetadata + */ + version: string; +} + +/** + * Check if a given object implements the VersionMetadata interface. + */ +export function instanceOfVersionMetadata(value: object): value is VersionMetadata { + let isInstance = true; + isInstance = isInstance && "service" in value && value["service"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function VersionMetadataFromJSON(json: any): VersionMetadata { + return VersionMetadataFromJSONTyped(json, false); +} + +export function VersionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'service': json['service'], + 'version': json['version'], + }; +} + +export function VersionMetadataToJSON(value?: VersionMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'service': value.service, + 'version': value.version, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/index.ts b/packages/sdk/src/sdk/api/generated/default/models/index.ts index ee2bfd8033b..82ca075828f 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/index.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/index.ts @@ -3,9 +3,30 @@ export * from './Access'; export * from './AccessGate'; export * from './AccessInfoResponse'; +export * from './AccountCollection'; +export * from './AccountCollectionUser'; +export * from './AccountFull'; export * from './Activity'; +export * from './ActivityFull'; export * from './AlbumBacklink'; export * from './AlbumsResponse'; +export * from './AnnouncementNotification'; +export * from './AnnouncementNotificationAction'; +export * from './AnnouncementNotificationActionData'; +export * from './ApproveManagerRequestNotification'; +export * from './ApproveManagerRequestNotificationAction'; +export * from './ApproveManagerRequestNotificationActionData'; +export * from './ArtistRemixContestEndedNotification'; +export * from './ArtistRemixContestEndedNotificationAction'; +export * from './ArtistRemixContestEndedNotificationActionData'; +export * from './ArtistRemixContestEndingSoonNotification'; +export * from './ArtistRemixContestEndingSoonNotificationAction'; +export * from './ArtistRemixContestEndingSoonNotificationActionData'; +export * from './ArtistRemixContestSubmissionsNotification'; +export * from './ArtistRemixContestSubmissionsNotificationAction'; +export * from './ArtistRemixContestSubmissionsNotificationActionData'; +export * from './Attestation'; +export * from './AttestationReponse'; export * from './AuthorizedApp'; export * from './AuthorizedApps'; export * from './BalanceHistoryDataPoint'; @@ -14,9 +35,17 @@ export * from './BestSellingItem'; export * from './BestSellingResponse'; export * from './BlobInfo'; export * from './ChallengeResponse'; +export * from './ChallengeRewardNotification'; +export * from './ChallengeRewardNotificationAction'; +export * from './ChallengeRewardNotificationActionData'; +export * from './CidData'; +export * from './CidDataResponse'; export * from './ClaimRewardsRequest'; export * from './ClaimRewardsResponse'; export * from './ClaimRewardsResponseDataInner'; +export * from './ClaimableRewardNotification'; +export * from './ClaimableRewardNotificationAction'; +export * from './ClaimableRewardNotificationActionData'; export * from './ClaimedPrize'; export * from './ClaimedPrizesResponse'; export * from './Coin'; @@ -37,21 +66,57 @@ export * from './CoinsVolumeLeadersResponseDataInner'; export * from './Collectibles'; export * from './CollectiblesResponse'; export * from './CollectionActivity'; +export * from './CollectionActivityFullWithoutTracks'; +export * from './CollectionLibraryResponseFull'; export * from './Comment'; export * from './CommentMention'; +export * from './CommentMentionNotification'; +export * from './CommentMentionNotificationAction'; +export * from './CommentMentionNotificationActionData'; +export * from './CommentNotification'; +export * from './CommentNotificationAction'; +export * from './CommentNotificationActionData'; export * from './CommentNotificationSetting'; +export * from './CommentReactionNotification'; +export * from './CommentReactionNotificationAction'; +export * from './CommentReactionNotificationActionData'; export * from './CommentRepliesResponse'; export * from './CommentResponse'; +export * from './CommentThreadNotification'; +export * from './CommentThreadNotificationAction'; +export * from './CommentThreadNotificationActionData'; export * from './ConnectedWallets'; export * from './ConnectedWalletsResponse'; +export * from './CosignNotification'; +export * from './CosignNotificationAction'; +export * from './CosignNotificationActionData'; +export * from './CoverArt'; export * from './CoverPhoto'; +export * from './CoverPhotoFull'; export * from './CreateCoinRequest'; export * from './CreateCoinResponse'; export * from './CreateCoinResponseData'; +export * from './CreateComment201Response'; +export * from './CreateCommentRequest'; +export * from './CreateDeveloperAppRequest'; +export * from './CreateDeveloperAppRequestAppSignature'; +export * from './CreateNotification'; +export * from './CreateNotificationAction'; +export * from './CreateNotificationActionData'; +export * from './CreatePlaylist201Response'; +export * from './CreatePlaylistNotificationActionData'; +export * from './CreatePlaylistRequest'; +export * from './CreatePlaylistRequestPlaylistContentsInner'; export * from './CreateRewardCodeRequest'; export * from './CreateRewardCodeResponse'; +export * from './CreateTrack201Response'; +export * from './CreateTrackNotificationActionData'; +export * from './CreateTrackRequest'; +export * from './CreateUser201Response'; +export * from './CreateUserRequest'; export * from './DashboardWalletUser'; export * from './DashboardWalletUsersResponse'; +export * from './DataAndType'; export * from './DecodedUserToken'; export * from './DeveloperApp'; export * from './DeveloperAppResponse'; @@ -65,45 +130,122 @@ export * from './ExtendedPaymentSplit'; export * from './ExtendedPurchaseGate'; export * from './ExtendedTokenGate'; export * from './ExtendedUsdcGate'; +export * from './FanRemixContestEndedNotification'; +export * from './FanRemixContestEndedNotificationAction'; +export * from './FanRemixContestEndedNotificationActionData'; +export * from './FanRemixContestEndingSoonNotification'; +export * from './FanRemixContestEndingSoonNotificationAction'; +export * from './FanRemixContestEndingSoonNotificationActionData'; +export * from './FanRemixContestStartedNotification'; +export * from './FanRemixContestStartedNotificationAction'; +export * from './FanRemixContestStartedNotificationActionData'; +export * from './FanRemixContestWinnersSelectedNotification'; +export * from './FanRemixContestWinnersSelectedNotificationAction'; +export * from './FanRemixContestWinnersSelectedNotificationActionData'; export * from './Favorite'; export * from './FavoritesResponse'; +export * from './FieldVisibility'; export * from './FollowGate'; +export * from './FollowNotification'; +export * from './FollowNotificationAction'; +export * from './FollowNotificationActionData'; export * from './FollowersResponse'; export * from './FollowingResponse'; +export * from './FullBulkSubscribersResponse'; +export * from './FullGetSupporter'; +export * from './FullGetSupporting'; +export * from './FullRemix'; +export * from './FullRemixParent'; +export * from './FullReposts'; +export * from './FullSupporter'; +export * from './FullSupporting'; +export * from './FullTracksResponse'; +export * from './FullTrendingPlaylistsResponse'; export * from './GetChallenges'; export * from './GetSupportedUsers'; export * from './GetSupporters'; export * from './GetTipsResponse'; +export * from './Grant'; export * from './HistoryResponse'; export * from './ListenCount'; +export * from './ListenStreakReminderNotification'; +export * from './ListenStreakReminderNotificationAction'; +export * from './ListenStreakReminderNotificationActionData'; +export * from './ManagedUser'; +export * from './ManagedUsersResponse'; +export * from './ManagersResponse'; export * from './MediaLink'; +export * from './MilestoneNotification'; +export * from './MilestoneNotificationAction'; +export * from './MilestoneNotificationActionData'; export * from './MonthlyAggregatePlay'; export * from './MutualFollowersResponse'; export * from './NftCollection'; export * from './NftGate'; +export * from './Notification'; +export * from './Notifications'; +export * from './NotificationsResponse'; export * from './Playlist'; export * from './PlaylistAddedTimestamp'; export * from './PlaylistArtwork'; +export * from './PlaylistArtworkFull'; +export * from './PlaylistFeedItem'; +export * from './PlaylistFull'; +export * from './PlaylistFullWithoutTracks'; +export * from './PlaylistLibrary'; +export * from './PlaylistMilestoneNotificationActionData'; export * from './PlaylistResponse'; export * from './PlaylistSearchResult'; export * from './PlaylistTracksResponse'; +export * from './PlaylistUpdate'; +export * from './PlaylistUpdates'; +export * from './PlaylistUpdatesResponse'; export * from './PlaylistsResponse'; export * from './PrizeClaimRequest'; export * from './PrizeClaimResponse'; export * from './PrizePublic'; export * from './PrizesResponse'; export * from './ProfilePicture'; +export * from './ProfilePictureFull'; +export * from './Purchase'; +export * from './PurchaseSplit'; +export * from './PurchasersCountResponse'; export * from './PurchasersResponse'; +export * from './PurchasesCountResponse'; +export * from './PurchasesResponse'; +export * from './Reaction'; +export * from './ReactionNotification'; +export * from './ReactionNotificationAction'; +export * from './ReactionNotificationActionData'; +export * from './Reactions'; +export * from './ReceiveTipNotification'; +export * from './ReceiveTipNotificationAction'; +export * from './ReceiveTipNotificationActionData'; +export * from './RecordTrackDownloadRequest'; export * from './RedeemAmountResponse'; export * from './RelatedArtistResponse'; +export * from './RemixNotification'; +export * from './RemixNotificationAction'; +export * from './RemixNotificationActionData'; export * from './RemixParent'; +export * from './RemixablesResponse'; export * from './RemixedTrackAggregate'; +export * from './RemixersCountResponse'; export * from './RemixersResponse'; export * from './RemixesResponse'; export * from './RemixingResponse'; export * from './ReplyComment'; export * from './Repost'; +export * from './RepostNotification'; +export * from './RepostNotificationAction'; +export * from './RepostNotificationActionData'; +export * from './RepostOfRepostNotification'; +export * from './RepostOfRepostNotificationAction'; +export * from './RepostOfRepostNotificationActionData'; export * from './Reposts'; +export * from './RequestManagerNotification'; +export * from './RequestManagerNotificationAction'; +export * from './RequestManagerNotificationActionData'; export * from './RewardCodeErrorResponse'; export * from './RewardCodeResponse'; export * from './SaleJson'; @@ -111,54 +253,130 @@ export * from './SalesAggregate'; export * from './SalesAggregateResponse'; export * from './SalesJsonContent'; export * from './SalesJsonResponse'; +export * from './SaveNotification'; +export * from './SaveNotificationAction'; +export * from './SaveNotificationActionData'; +export * from './SaveOfRepostNotification'; +export * from './SaveOfRepostNotificationAction'; +export * from './SaveOfRepostNotificationActionData'; +export * from './SearchAutocompleteResponse'; +export * from './SearchFullResponse'; +export * from './SearchModel'; +export * from './SearchPlaylistFull'; +export * from './SearchTrackFull'; +export * from './SendTipNotification'; +export * from './SendTipNotificationAction'; +export * from './SendTipNotificationActionData'; export * from './Stem'; +export * from './StemParent'; export * from './StemsResponse'; export * from './StreamUrlResponse'; export * from './SubscribersResponse'; export * from './Supporter'; +export * from './SupporterDethronedNotification'; +export * from './SupporterDethronedNotificationAction'; +export * from './SupporterDethronedNotificationActionData'; +export * from './SupporterRankUpNotification'; +export * from './SupporterRankUpNotificationAction'; +export * from './SupporterRankUpNotificationActionData'; export * from './Supporting'; export * from './TagsResponse'; +export * from './TastemakerNotification'; +export * from './TastemakerNotificationAction'; +export * from './TastemakerNotificationActionData'; +export * from './TierChangeNotification'; +export * from './TierChangeNotificationAction'; +export * from './TierChangeNotificationActionData'; export * from './Tip'; export * from './TipGate'; export * from './TokenGate'; +export * from './TopGenreUsersResponseFull'; export * from './TopListener'; +export * from './TopUsersResponseFull'; export * from './Track'; export * from './TrackAccessInfo'; export * from './TrackActivity'; +export * from './TrackActivityFull'; +export * from './TrackAddedToPlaylistNotification'; +export * from './TrackAddedToPlaylistNotificationAction'; +export * from './TrackAddedToPlaylistNotificationActionData'; +export * from './TrackAddedToPurchasedAlbumNotification'; +export * from './TrackAddedToPurchasedAlbumNotificationAction'; +export * from './TrackAddedToPurchasedAlbumNotificationActionData'; export * from './TrackArtwork'; +export * from './TrackArtworkFull'; export * from './TrackCommentCountResponse'; export * from './TrackCommentNotificationResponse'; export * from './TrackCommentsResponse'; export * from './TrackElement'; export * from './TrackFavoritesResponse'; +export * from './TrackFeedItem'; +export * from './TrackFull'; export * from './TrackId'; export * from './TrackInspect'; export * from './TrackInspectList'; +export * from './TrackLibraryResponseFull'; +export * from './TrackMilestoneNotificationActionData'; export * from './TrackRepostsResponse'; export * from './TrackResponse'; export * from './TrackSearch'; +export * from './TrackSegment'; export * from './TracksCountResponse'; export * from './TracksResponse'; +export * from './TransactionDetails'; +export * from './TransactionHistoryCountResponse'; +export * from './TransactionHistoryResponse'; export * from './TrendingIdsResponse'; +export * from './TrendingNotification'; +export * from './TrendingNotificationAction'; +export * from './TrendingNotificationActionData'; +export * from './TrendingPlaylistNotification'; +export * from './TrendingPlaylistNotificationAction'; +export * from './TrendingPlaylistNotificationActionData'; export * from './TrendingPlaylistsResponse'; export * from './TrendingTimesIds'; +export * from './TrendingUndergroundNotification'; +export * from './TrendingUndergroundNotificationAction'; +export * from './TrendingUndergroundNotificationActionData'; export * from './UnclaimedIdResponse'; export * from './UndisbursedChallenge'; export * from './UndisbursedChallenges'; export * from './UpdateCoinRequest'; export * from './UpdateCoinResponse'; +export * from './UpdateCommentRequest'; +export * from './UpdateDeveloperAppRequest'; +export * from './UpdatePlaylistRequest'; +export * from './UpdatePlaylistRequestPlaylistContentsInner'; +export * from './UpdateTrackRequest'; +export * from './UpdateUserRequest'; +export * from './UrlWithMirrors'; +export * from './UsdcPurchaseBuyerNotification'; +export * from './UsdcPurchaseBuyerNotificationAction'; +export * from './UsdcPurchaseBuyerNotificationActionData'; +export * from './UsdcPurchaseSellerNotification'; +export * from './UsdcPurchaseSellerNotificationAction'; +export * from './UsdcPurchaseSellerNotificationActionData'; export * from './User'; +export * from './UserAccountResponseFull'; export * from './UserCoin'; export * from './UserCoinAccount'; export * from './UserCoinResponse'; export * from './UserCoinWithAccounts'; export * from './UserCoinsResponse'; export * from './UserCommentsResponse'; +export * from './UserFeedItem'; +export * from './UserFeedResponse'; +export * from './UserFull'; +export * from './UserFullArtistCoinBadge'; export * from './UserIdAddress'; export * from './UserIdsAddressesResponse'; +export * from './UserManager'; +export * from './UserMilestoneNotificationActionData'; export * from './UserResponse'; export * from './UserSearch'; +export * from './UserSubscribers'; export * from './UserTrackListenCountsResponse'; export * from './UserTracksRemixedResponse'; export * from './UsersResponse'; export * from './VerifyToken'; +export * from './VersionMetadata'; diff --git a/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts b/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts index 3e2f1c3c165..297dd17d25c 100644 --- a/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts +++ b/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts @@ -1,4 +1,5 @@ import type { Configuration } from '../../api/generated/default' +import type { NotificationsApi as NotificationsApiFull } from '../../api/generated/full' import type { EntityManagerService } from '../../services' import { Action, EntityType } from '../../services/EntityManager/types' import { parseParams } from '../../utils/parseParams' @@ -14,9 +15,28 @@ export class NotificationsApi { // eslint-disable-next-line no-useless-constructor constructor( _config: Configuration, - private readonly entityManager: EntityManagerService + private readonly entityManager: EntityManagerService, + private readonly notificationsApiFullDefaultPath?: NotificationsApiFull ) {} + /** Get notifications for a user (delegates to full API with default basePath). */ + getNotifications( + params: Parameters[0] + ) { + if (!this.notificationsApiFullDefaultPath) + throw new Error('NotificationsApiFull (default path) not configured') + return this.notificationsApiFullDefaultPath.getNotifications(params) + } + + /** Get playlist updates for a user (delegates to full API with default basePath). */ + getPlaylistUpdates( + params: Parameters[0] + ) { + if (!this.notificationsApiFullDefaultPath) + throw new Error('NotificationsApiFull (default path) not configured') + return this.notificationsApiFullDefaultPath.getPlaylistUpdates(params) + } + /** * When a user views all of their notifications */ diff --git a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts index aa7d1a49e90..f462c3712e9 100644 --- a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts +++ b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +// @ts-nocheck - Custom API overrides use different param/return types than generated base import { pick } from 'lodash' import snakecaseKeys from 'snakecase-keys' import type { z } from 'zod' @@ -17,6 +19,7 @@ import { Configuration, PlaylistsApi as GeneratedPlaylistsApi } from '../generated/default' +import type { PlaylistsApi as PlaylistsApiFull } from '../generated/full' import { TrackUploadHelper } from '../tracks/TrackUploadHelper' import { @@ -61,13 +64,34 @@ export class PlaylistsApi extends GeneratedPlaylistsApi { configuration: Configuration, private readonly storage: StorageService, private readonly entityManager: EntityManagerService, - private readonly logger: LoggerService + private readonly logger: LoggerService, + private readonly playlistsApiFullDefaultPath?: PlaylistsApiFull ) { super(configuration) this.trackUploadHelper = new TrackUploadHelper(configuration) this.logger = logger.createPrefixedLogger('[playlists-api]') } + /** Get users who favorited a playlist (delegates to full API when configured). */ + getUsersFromPlaylistFavorites( + params: Parameters[0] + ) { + if (!this.playlistsApiFullDefaultPath) + throw new Error('PlaylistsApi full default path not configured') + return this.playlistsApiFullDefaultPath.getUsersFromPlaylistFavorites( + params + ) + } + + /** Get users who reposted a playlist (delegates to full API when configured). */ + getUsersFromPlaylistReposts( + params: Parameters[0] + ) { + if (!this.playlistsApiFullDefaultPath) + throw new Error('PlaylistsApi full default path not configured') + return this.playlistsApiFullDefaultPath.getUsersFromPlaylistReposts(params) + } + /** @hidden * Create a playlist from existing tracks */ diff --git a/packages/sdk/src/sdk/api/tracks/TracksApi.ts b/packages/sdk/src/sdk/api/tracks/TracksApi.ts index 40e18e3a840..d32debe65a2 100644 --- a/packages/sdk/src/sdk/api/tracks/TracksApi.ts +++ b/packages/sdk/src/sdk/api/tracks/TracksApi.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +// @ts-nocheck - Custom API overrides use different param/return types than generated base import { USDC } from '@audius/fixed-decimal' import { TransactionInstruction } from '@solana/web3.js' import snakecaseKeys from 'snakecase-keys' diff --git a/packages/sdk/src/sdk/api/users/UsersApi.ts b/packages/sdk/src/sdk/api/users/UsersApi.ts index cee604a1af1..6990923bf35 100644 --- a/packages/sdk/src/sdk/api/users/UsersApi.ts +++ b/packages/sdk/src/sdk/api/users/UsersApi.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +// @ts-nocheck - Custom API overrides use different param/return types than generated base import { wAUDIO } from '@audius/fixed-decimal' import snakecaseKeys from 'snakecase-keys' @@ -25,6 +27,7 @@ import { UsersApi as GeneratedUsersApi } from '../generated/default' import * as runtime from '../generated/default/runtime' +import type { UsersApi as UsersApiFull } from '../generated/full' import { AddAssociatedWalletRequest, @@ -61,12 +64,68 @@ export class UsersApi extends GeneratedUsersApi { private readonly logger: LoggerService, private readonly claimableTokens: ClaimableTokensClient, private readonly solanaClient: SolanaClient, - private readonly emailEncryption: EmailEncryptionService + private readonly emailEncryption: EmailEncryptionService, + private readonly usersApiFullDefaultPath?: UsersApiFull ) { super(configuration) this.logger = logger.createPrefixedLogger('[users-api]') } + /** Get user account by wallet (delegates to full API with default basePath). */ + getUserAccount(params: { + wallet: string + encodedDataMessage?: string + encodedDataSignature?: string + }) { + if (!this.usersApiFullDefaultPath) + throw new Error('UsersApiFull (default path) not configured') + return this.usersApiFullDefaultPath.getUserAccount(params) + } + + /** Get managers for a user (delegates to full API with default basePath). */ + getManagers(params: Parameters[0]) { + if (!this.usersApiFullDefaultPath) + throw new Error('UsersApiFull (default path) not configured') + return this.usersApiFullDefaultPath.getManagers(params) + } + + /** Get audio transactions for a user (delegates to full API with default basePath). */ + getAudioTransactions( + params: Parameters[0] + ) { + if (!this.usersApiFullDefaultPath) + throw new Error('UsersApiFull (default path) not configured') + return this.usersApiFullDefaultPath.getAudioTransactions(params) + } + + /** Get reposts by handle (delegates to full API with default basePath). */ + getRepostsByHandle(params: { + handle: string + userId?: string + limit?: number + offset?: number + }) { + if (!this.usersApiFullDefaultPath) + throw new Error('UsersApiFull (default path) not configured') + return this.usersApiFullDefaultPath.getRepostsByHandle(params) + } + + /** Get user feed (delegates to full API with default basePath). */ + getUserFeed(params: Parameters[0]) { + if (!this.usersApiFullDefaultPath) + throw new Error('UsersApiFull (default path) not configured') + return this.usersApiFullDefaultPath.getUserFeed(params) + } + + /** Get user library tracks (delegates to full API with default basePath). */ + getUserLibraryTracks( + params: Parameters[0] + ) { + if (!this.usersApiFullDefaultPath) + throw new Error('UsersApiFull (default path) not configured') + return this.usersApiFullDefaultPath.getUserLibraryTracks(params) + } + /** @hidden * Generate a new user id for use in creation flow */ diff --git a/packages/sdk/src/sdk/config/production.ts b/packages/sdk/src/sdk/config/production.ts index 4d336451f88..48f837b180f 100644 --- a/packages/sdk/src/sdk/config/production.ts +++ b/packages/sdk/src/sdk/config/production.ts @@ -7,7 +7,7 @@ import type { SdkServicesConfig } from './types' export const productionConfig: SdkServicesConfig = { network: { minVersion: '0.7.0', - apiEndpoint: 'https://api.audius.co', + apiEndpoint: 'http://localhost:1323', storageNodes: [ { endpoint: 'https://creatornode3.audius.co', diff --git a/packages/sdk/src/sdk/examples/signed-request/index.ts b/packages/sdk/src/sdk/examples/signed-request/index.ts index dc1a219046f..e95448edce3 100644 --- a/packages/sdk/src/sdk/examples/signed-request/index.ts +++ b/packages/sdk/src/sdk/examples/signed-request/index.ts @@ -50,7 +50,7 @@ const main = async () => { ).data?.id // Get our listening history, which requires us to be logged in - const history = await audiusSdk.full.users.getUsersTrackHistory({ + const history = await audiusSdk.users.getUsersTrackHistory({ id: userId!, limit: 1 }) diff --git a/packages/sdk/src/sdk/index.ts b/packages/sdk/src/sdk/index.ts index 6680447650b..89e35f0d466 100644 --- a/packages/sdk/src/sdk/index.ts +++ b/packages/sdk/src/sdk/index.ts @@ -2,7 +2,7 @@ export { sdk } from './sdk' export type { AudiusSdk } from './sdk' export * as full from './api/generated/full' -export * from './api/generated/default' +export * from './api/generated/default-reexport' export { TracksApi } from './api/tracks/TracksApi' export { PlaylistsApi } from './api/playlists/PlaylistsApi' export { AlbumsApi } from './api/albums/AlbumsApi' diff --git a/packages/sdk/src/sdk/middleware/addAppInfoMiddleware.ts b/packages/sdk/src/sdk/middleware/addAppInfoMiddleware.ts index ddda724e15d..0f926d6383b 100644 --- a/packages/sdk/src/sdk/middleware/addAppInfoMiddleware.ts +++ b/packages/sdk/src/sdk/middleware/addAppInfoMiddleware.ts @@ -47,11 +47,10 @@ export const addAppInfoMiddleware = ({ providedApiKey ?? (await services.audiusWalletClient.getAddresses())[0] if (apiKey) { - appName = ( - await developerApps.getDeveloperApp({ - address: apiKey - }) - ).data?.name + const app = (await developerApps.getDeveloperApp({ + address: apiKey + })) as { name?: string; data?: { name?: string } } + appName = app?.data?.name ?? app?.name } } diff --git a/packages/sdk/src/sdk/sdk.ts b/packages/sdk/src/sdk/sdk.ts index 008cbb12b17..f0566cad74c 100644 --- a/packages/sdk/src/sdk/sdk.ts +++ b/packages/sdk/src/sdk/sdk.ts @@ -18,6 +18,7 @@ import { TipsApi, WalletApi } from './api/generated/default' +import type { UsersApi as GeneratedUsersApi } from './api/generated/default' import { TracksApi as TracksApiFull, Configuration as ConfigurationFull, @@ -126,7 +127,7 @@ export const sdk = (config: SdkConfig) => { ? new OAuth({ appName, apiKey, - usersApi: apis.users, + usersApi: apis.users as unknown as GeneratedUsersApi, logger: services.logger }) : undefined @@ -441,6 +442,23 @@ const initializeApis = ({ basePath }) + // Full API with default basePath for endpoints served at /v1 (no /full) + const apiClientConfigFullDefaultPath = new ConfigurationFull({ + basePath, + fetchApi: fetch, + middleware + }) + const search = new SearchApiFull(apiClientConfigFullDefaultPath) + const usersApiFullDefaultPath = new UsersApiFull( + apiClientConfigFullDefaultPath + ) + const notificationsApiFullDefaultPath = new NotificationsApiFull( + apiClientConfigFullDefaultPath + ) + const playlistsApiFullDefaultPath = new PlaylistsApiFull( + apiClientConfigFullDefaultPath + ) + const tracks = new TracksApi( apiClientConfig, services.storage, @@ -458,7 +476,8 @@ const initializeApis = ({ services.logger, services.claimableTokensClient, services.solanaClient, - services.emailEncryptionService + services.emailEncryptionService, + usersApiFullDefaultPath ) const albums = new AlbumsApi( apiClientConfig, @@ -474,7 +493,8 @@ const initializeApis = ({ apiClientConfig, services.storage, services.entityManager, - services.logger + services.logger, + playlistsApiFullDefaultPath ) const comments = new CommentsApi( apiClientConfig, @@ -500,7 +520,11 @@ const initializeApis = ({ services.logger ) - const grants = new GrantsApi(apiClientConfig, services.entityManager, users) + const grants = new GrantsApi( + apiClientConfig, + services.entityManager, + users as unknown as GeneratedUsersApi + ) const developerApps = new DeveloperAppsApi( apiClientConfig, @@ -514,7 +538,8 @@ const initializeApis = ({ const notifications = new NotificationsApi( apiClientConfig, - services.entityManager + services.entityManager, + notificationsApiFullDefaultPath ) const generatedApiClientConfigFull = new ConfigurationFull({ @@ -551,6 +576,7 @@ const initializeApis = ({ playlists, tips, resolve, + search, full, chats, grants, diff --git a/packages/web/src/common/store/cache/collections/createAlbumSaga.ts b/packages/web/src/common/store/cache/collections/createAlbumSaga.ts index 90e7df94136..3b18d804d52 100644 --- a/packages/web/src/common/store/cache/collections/createAlbumSaga.ts +++ b/packages/web/src/common/store/cache/collections/createAlbumSaga.ts @@ -176,7 +176,7 @@ function* createAndConfirmAlbum( }) const { data: album } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + [sdk.playlists, sdk.playlists.getPlaylist], { userId: OptionalId.parse(userId), playlistId: Id.parse(albumId) diff --git a/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts b/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts index 44ca8969bb7..66fce719f32 100644 --- a/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts +++ b/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts @@ -201,7 +201,7 @@ function* createAndConfirmPlaylist( // Merge the confirmed playlist with the optimistic playlist, preferring // optimistic data in case other unconfirmed edits have been made. const { data: playlist } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + [sdk.playlists, sdk.playlists.getPlaylist], { userId: OptionalId.parse(userId), playlistId: Id.parse(playlistId) diff --git a/packages/web/src/common/store/pages/feed/lineup/sagas.ts b/packages/web/src/common/store/pages/feed/lineup/sagas.ts index e17cc8011d8..87ae1894059 100644 --- a/packages/web/src/common/store/pages/feed/lineup/sagas.ts +++ b/packages/web/src/common/store/pages/feed/lineup/sagas.ts @@ -59,18 +59,15 @@ function* getTracks({ const followeeUserIds = yield* select(getFollowIds) const userId = Id.parse(currentUserId) - const { data = [] } = yield* call( - [sdk.full.users, sdk.full.users.getUserFeed], - { - id: userId, - userId, - filter, - limit, - offset, - followeeUserId: followeeUserIds.length ? followeeUserIds : undefined, - withUsers: true - } - ) + const { data = [] } = yield* call([sdk.users, sdk.users.getUserFeed], { + id: userId, + userId, + filter, + limit, + offset, + followeeUserId: followeeUserIds.length ? followeeUserIds : undefined, + withUsers: true + }) const feed = transformAndCleanList(data, userFeedItemFromSDK).map( ({ item }) => item ) diff --git a/packages/web/src/common/store/pages/library/sagas.ts b/packages/web/src/common/store/pages/library/sagas.ts index 79f52dfe298..baca5cefb2c 100644 --- a/packages/web/src/common/store/pages/library/sagas.ts +++ b/packages/web/src/common/store/pages/library/sagas.ts @@ -56,7 +56,7 @@ function* sendLibraryRequest({ const sdk = yield* call(audiusSdk) const libraryTracksResponse = yield* call( - [sdk.full.users, sdk.full.users.getUserLibraryTracks], + [sdk.users, sdk.users.getUserLibraryTracks], { id: Id.parse(userId), userId: Id.parse(userId), diff --git a/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts b/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts index 3dd42ac89fb..869fe4ea6c0 100644 --- a/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts +++ b/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts @@ -48,7 +48,7 @@ export function* retrieveUserReposts({ yield* waitForRead() const sdk = yield* getSDK() - const { data: repostsSDKData } = yield sdk.full.users.getRepostsByHandle({ + const { data: repostsSDKData } = yield sdk.users.getRepostsByHandle({ handle, userId: OptionalId.parse(currentUserId), limit, diff --git a/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts b/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts index d3a477c6476..35ddd3ecc23 100644 --- a/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts +++ b/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts @@ -31,7 +31,7 @@ export function* retrieveUserTracks({ }: RetrieveUserTracksArgs): Generator { const sdk = yield* getSDK() const { data = [] } = yield* call( - [sdk.full.users, sdk.users.getTracksByUserHandle], + [sdk.users, sdk.users.getTracksByUserHandle], { handle, sort, diff --git a/packages/web/src/common/store/search-ai-bar/sagas.ts b/packages/web/src/common/store/search-ai-bar/sagas.ts index 18ed60c93a6..ea4aa74f1bb 100644 --- a/packages/web/src/common/store/search-ai-bar/sagas.ts +++ b/packages/web/src/common/store/search-ai-bar/sagas.ts @@ -20,16 +20,13 @@ function* getSearchResults(searchText: string) { const sdk = yield* getSDK() const userId = yield* call(queryCurrentUserId) - const { data } = yield* call( - [sdk.full.search, sdk.full.search.searchAutocomplete], - { - userId: OptionalId.parse(userId), - query: searchText, - limit: 10, - offset: 0, - kind: SearchKind.USERS - } - ) + const { data } = yield* call([sdk.search, sdk.search.searchAutocomplete], { + userId: OptionalId.parse(userId), + query: searchText, + limit: 10, + offset: 0, + kind: SearchKind.USERS + }) const results = limitAutocompleteResults(searchResultsFromSDK(data)) const { users } = results diff --git a/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx b/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx index 8ce48501068..2dcb9298bb9 100644 --- a/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx +++ b/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx @@ -199,7 +199,7 @@ export const OAuthLoginPage = () => { ) const sdk = await audiusSdk() - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet: signInResponse.walletAddress }) if (!data) { diff --git a/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx b/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx index 3a977e42af1..8ddb877d680 100644 --- a/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx +++ b/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx @@ -140,7 +140,7 @@ export const OAuthSignUpPage = () => { const maxRetries = 15 while (retries < maxRetries) { try { - const response = await sdk.full.users.getUserAccount({ + const response = await sdk.users.getUserAccount({ wallet }) if (response.data) { diff --git a/packages/web/src/pages/oauth-login-page/utils.ts b/packages/web/src/pages/oauth-login-page/utils.ts index f63372c8bf2..8e11d8bbcfc 100644 --- a/packages/web/src/pages/oauth-login-page/utils.ts +++ b/packages/web/src/pages/oauth-login-page/utils.ts @@ -166,10 +166,13 @@ export const authWrite = async ({ userId, appApiKey }: CreateGrantRequest) => { }) } -export const getDeveloperApp = async (address: string) => { +export const getDeveloperApp = async ( + address: string +): Promise<{ name?: string; imageUrl?: string }> => { const sdk = await audiusSdk() - const developerApp = await sdk.developerApps.getDeveloperApp({ address }) - return developerApp.data + const result = await sdk.developerApps.getDeveloperApp({ address }) + const app = result && 'data' in result ? result.data : result + return app as { name?: string; imageUrl?: string } } export const getIsAppAuthorized = async ({ diff --git a/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts b/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts index 53f54a57955..b9baa40eee3 100644 --- a/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts +++ b/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts @@ -14,7 +14,7 @@ import { appkitModal, audiusChain } from 'app/ReownAppKitModal' */ export const doesUserExist = async (sdk: AudiusSdk, wallet: string) => { try { - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet }) if (data?.user) { From 97c3e0d1f6a50b61d96f9b8f40a4aa0b7c1eeee9 Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Thu, 12 Feb 2026 09:51:47 -0800 Subject: [PATCH 2/2] Fix --- packages/sdk/src/sdk/config/production.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/src/sdk/config/production.ts b/packages/sdk/src/sdk/config/production.ts index 48f837b180f..4d336451f88 100644 --- a/packages/sdk/src/sdk/config/production.ts +++ b/packages/sdk/src/sdk/config/production.ts @@ -7,7 +7,7 @@ import type { SdkServicesConfig } from './types' export const productionConfig: SdkServicesConfig = { network: { minVersion: '0.7.0', - apiEndpoint: 'http://localhost:1323', + apiEndpoint: 'https://api.audius.co', storageNodes: [ { endpoint: 'https://creatornode3.audius.co',