diff --git a/packages/common/src/adapters/coin.ts b/packages/common/src/adapters/coin.ts index 1846321b006..ed3ce87991d 100644 --- a/packages/common/src/adapters/coin.ts +++ b/packages/common/src/adapters/coin.ts @@ -55,8 +55,12 @@ export const coinFromSdk = (input: CoinSDK | undefined): Coin | undefined => { // Birdeye data may not be available right after launch. // Fall back to dynamic bonding curve data if so. const defaultSupply = 1e9 + const dbc = input.dynamicBondingCurve + if (!dbc) { + return undefined + } - const { isMigrated, priceUSD, address } = input.dynamicBondingCurve + const { isMigrated, priceUSD, address } = dbc const hasBirdeyeSupply = input.totalSupply !== undefined && input.totalSupply > 0 const hasBirdeyePrice = input.price !== undefined && input.price > 0 @@ -67,14 +71,15 @@ export const coinFromSdk = (input: CoinSDK | undefined): Coin | undefined => { // For price, use the bonding curve price if the input hasn't graduated or we have no birdeye data const displayPrice = (!isMigrated && hasBondingCurveData) || !hasBirdeyePrice - ? priceUSD - : input.price + ? (priceUSD ?? 0) + : (input.price ?? 0) // For market cap, use the bonding curve market cap if the input hasn't graduated or we have no birdeye data const displayMarketCap = (!isMigrated && hasBondingCurveData) || !hasBirdeyeSupply - ? displayPrice * (hasBirdeyeSupply ? input.totalSupply : defaultSupply) - : input.marketCap + ? displayPrice * + (hasBirdeyeSupply ? (input.totalSupply ?? 0) : defaultSupply) + : (input.marketCap ?? 0) const { ownerId: _ignored, ...rest } = input return { diff --git a/packages/common/src/adapters/collection.ts b/packages/common/src/adapters/collection.ts index 1cec62adea6..f01e7307c5f 100644 --- a/packages/common/src/adapters/collection.ts +++ b/packages/common/src/adapters/collection.ts @@ -206,7 +206,7 @@ export const playlistMetadataForUpdateWithSDK = ( ? input.playlist_contents.track_ids.map((t) => ({ timestamp: t.time, trackId: Id.parse(t.track), - metadataTimestamp: t.metadata_time + metadataTimestamp: t.metadata_time ?? 0 })) : undefined, playlistName: input.playlist_name ?? '', diff --git a/packages/common/src/adapters/track.ts b/packages/common/src/adapters/track.ts index 6cca2f80b0f..30833e1d7bb 100644 --- a/packages/common/src/adapters/track.ts +++ b/packages/common/src/adapters/track.ts @@ -4,7 +4,7 @@ import { Genre, Mood, type NativeFile, - type TrackMetadata, + type UpdateTrackRequestBody, HashId, Id, OptionalHashId, @@ -260,7 +260,7 @@ const DEFAULT_GENRE = Genre.Electronic export const trackMetadataForUploadToSdk = ( input: TrackMetadataForUpload -): TrackMetadata => { +): UpdateTrackRequestBody => { const sdkGenre = toSdkGenre(input.genre) const genre = sdkGenre ?? DEFAULT_GENRE return { @@ -348,7 +348,7 @@ export const trackMetadataForUploadToSdk = ( camelcaseKeys(contributor) ) : undefined - } as TrackMetadata + } as UpdateTrackRequestBody } export const fileToSdk = ( diff --git a/packages/common/src/api/tan-query/coins/useUpdateArtistCoin.ts b/packages/common/src/api/tan-query/coins/useUpdateArtistCoin.ts index 44745c0a0f1..72648c71b86 100644 --- a/packages/common/src/api/tan-query/coins/useUpdateArtistCoin.ts +++ b/packages/common/src/api/tan-query/coins/useUpdateArtistCoin.ts @@ -71,7 +71,7 @@ export const useUpdateArtistCoin = () => { const response = await sdk.coins.updateCoin({ mint, userId: Id.parse(currentUserId), - metadata: { + updateCoinRequest: { description: updateCoinRequest.description, link1: updateCoinRequest.links?.[0] ?? '', link2: updateCoinRequest.links?.[1] ?? '', diff --git a/packages/common/src/api/tan-query/tracks/useFavoritedTracks.ts b/packages/common/src/api/tan-query/tracks/useFavoritedTracks.ts index 14092d3833e..7a0db2348a1 100644 --- a/packages/common/src/api/tan-query/tracks/useFavoritedTracks.ts +++ b/packages/common/src/api/tan-query/tracks/useFavoritedTracks.ts @@ -24,7 +24,7 @@ export const useFavoritedTracks = ( queryKey: getFavoritedTracksQueryKey(userId), queryFn: async () => { const sdk = await audiusSdk() - const { data } = await sdk.users.getFavorites({ + const { data } = await sdk.users.getUserFavorites({ id: Id.parse(userId) }) diff --git a/packages/common/src/api/tan-query/upload/usePublishCollection.ts b/packages/common/src/api/tan-query/upload/usePublishCollection.ts index a3d63e98ad3..df33253da97 100644 --- a/packages/common/src/api/tan-query/upload/usePublishCollection.ts +++ b/packages/common/src/api/tan-query/upload/usePublishCollection.ts @@ -109,8 +109,9 @@ const getPublishCollectionOptions = (context: PublishCollectionContext) => params.collectionMetadata ) metadata.playlistContents = publishedTracks.map((t) => ({ - timestamp: Date.now() / 1000, - trackId: Id.parse(t.trackId) + timestamp: Math.round(Date.now() / 1000), + trackId: Id.parse(t.trackId), + metadataTimestamp: Math.round(Date.now() / 1000) })) return await sdk.albums.createAlbum({ userId: Id.parse(userId), @@ -122,8 +123,9 @@ const getPublishCollectionOptions = (context: PublishCollectionContext) => params.collectionMetadata ) metadata.playlistContents = publishedTracks.map((t) => ({ - timestamp: Date.now() / 1000, - trackId: Id.parse(t.trackId) + timestamp: Math.round(Date.now() / 1000), + trackId: Id.parse(t.trackId), + metadataTimestamp: Math.round(Date.now() / 1000) })) return await sdk.playlists.createPlaylist({ userId: Id.parse(userId), diff --git a/packages/common/src/hooks/chats/useAudiusLinkResolver.ts b/packages/common/src/hooks/chats/useAudiusLinkResolver.ts index c78e0edaa4a..cb3a1f5918d 100644 --- a/packages/common/src/hooks/chats/useAudiusLinkResolver.ts +++ b/packages/common/src/hooks/chats/useAudiusLinkResolver.ts @@ -140,12 +140,15 @@ export const useAudiusLinkResolver = ({ data: res.data[0] } } else if (instanceOfUserResponse(res)) { - const human = formatUserName({ user: res.data }) - linkToHuman[match] = human - humanToData[human] = { - link: match, - type: 'user', - data: res.data + const user = Array.isArray(res.data) ? res.data[0] : res.data + if (user) { + const human = formatUserName({ user }) + linkToHuman[match] = human + humanToData[human] = { + link: match, + type: 'user', + data: user + } } } } diff --git a/packages/common/src/utils/coinMetrics.ts b/packages/common/src/utils/coinMetrics.ts index fab505a6d2a..8e3f4300cb3 100644 --- a/packages/common/src/utils/coinMetrics.ts +++ b/packages/common/src/utils/coinMetrics.ts @@ -69,19 +69,21 @@ export const createCoinMetrics = (coin: Coin): MetricData[] => { createMetric({ value: formatCurrencyWithSubscript(coin.displayPrice), label: messages.pricePerCoin, - changePercent: coin.priceChange24hPercent, + changePercent: + (coin as Coin & { priceChange24hPercent?: number }) + .priceChange24hPercent ?? undefined, rawValue: formatCurrency(coin.displayPrice) }), createMetric({ - value: `$${formatCount(coin.displayMarketCap, 2)}`, + value: `$${formatCount(coin.displayMarketCap ?? 0, 2)}`, label: messages.marketCap }), createMetric({ - value: `$${formatCount(coin.totalVolumeUSD, 2)}`, + value: `$${formatCount(coin.totalVolumeUSD ?? 0, 2)}`, label: messages.totalVolume }), createMetric({ - value: formatCount(coin.holder), + value: formatCount(coin.holder ?? 0), label: messages.uniqueHolders }), createMetric({ diff --git a/packages/mobile/src/components/core/UserGeneratedText.tsx b/packages/mobile/src/components/core/UserGeneratedText.tsx index b33c99e82ba..84c458f1fa0 100644 --- a/packages/mobile/src/components/core/UserGeneratedText.tsx +++ b/packages/mobile/src/components/core/UserGeneratedText.tsx @@ -99,11 +99,14 @@ const Link = ({ params: { id: HashId.parse(res.data[0].id) } }) } else if (instanceOfUserResponse(res)) { - setUnfurledContent(formatUserName({ user: res.data })) - setTo({ - screen: 'Profile', - params: { id: HashId.parse(res.data.id) } - }) + const user = Array.isArray(res.data) ? res.data[0] : res.data + if (user) { + setUnfurledContent(formatUserName({ user })) + setTo({ + screen: 'Profile', + params: { id: HashId.parse(user.id) } + }) + } } } } diff --git a/packages/mobile/src/screens/buy-sell-screen/components/BuyScreen.tsx b/packages/mobile/src/screens/buy-sell-screen/components/BuyScreen.tsx index 5a227751de5..b2e4026bf9b 100644 --- a/packages/mobile/src/screens/buy-sell-screen/components/BuyScreen.tsx +++ b/packages/mobile/src/screens/buy-sell-screen/components/BuyScreen.tsx @@ -148,7 +148,7 @@ export const BuyScreen = ({ onAmountChange={handleOutputAmountChange} availableBalance={0} exchangeRate={currentExchangeRate} - tokenPrice={tokenPriceData?.price.toString() ?? null} + tokenPrice={tokenPriceData?.price?.toString() ?? null} isTokenPriceLoading={isTokenPriceLoading} tokenPriceDecimalPlaces={decimalPlaces} availableTokens={availableOutputTokens ?? artistCoins} diff --git a/packages/mobile/src/screens/buy-sell-screen/components/ConvertScreen.tsx b/packages/mobile/src/screens/buy-sell-screen/components/ConvertScreen.tsx index 7ffc3e5fb5f..4dbd2f3d4f7 100644 --- a/packages/mobile/src/screens/buy-sell-screen/components/ConvertScreen.tsx +++ b/packages/mobile/src/screens/buy-sell-screen/components/ConvertScreen.tsx @@ -233,7 +233,7 @@ export const ConvertScreen = ({ onAmountChange={handleOutputAmountChange} availableBalance={0} exchangeRate={currentExchangeRate} - tokenPrice={tokenPriceData?.price.toString() ?? null} + tokenPrice={tokenPriceData?.price?.toString() ?? null} isTokenPriceLoading={isTokenPriceLoading} tokenPriceDecimalPlaces={decimalPlaces} availableTokens={filteredAvailableOutputTokens} diff --git a/packages/mobile/src/screens/buy-sell-screen/useBuySellFlow.tsx b/packages/mobile/src/screens/buy-sell-screen/useBuySellFlow.tsx index 9514f11da82..8d79a311a32 100644 --- a/packages/mobile/src/screens/buy-sell-screen/useBuySellFlow.tsx +++ b/packages/mobile/src/screens/buy-sell-screen/useBuySellFlow.tsx @@ -240,9 +240,9 @@ export const useBuySellFlow = ({ swapTokens.outputTokenInfo?.address ) const pricePerBaseToken = useMemo(() => { - return outputCoin?.price - ? outputCoin?.price - : (outputCoin?.dynamicBondingCurve.priceUSD ?? 0) + return outputCoin?.price !== undefined && outputCoin.price !== 0 + ? outputCoin.price + : (outputCoin?.dynamicBondingCurve?.priceUSD ?? 0) }, [outputCoin]) const handleContinueClick = useCallback(() => { diff --git a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/syncCollectionWorker.ts b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/syncCollectionWorker.ts index c4f5c334dfa..4e06ae22364 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/syncCollectionWorker.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/syncCollectionWorker.ts @@ -85,9 +85,9 @@ function* syncFavoritesCollection() { const sdk = yield* getSDK() const offlineTrackMetadata = yield* select(getOfflineTrackMetadata) - const { data } = yield* call([sdk.users, sdk.users.getFavorites], { + const { data } = (yield* call([sdk.users, sdk.users.getUserFavorites], { id: Id.parse(currentUserId) - }) + })) as import('@audius/sdk').FavoritesResponse const latestFavoritedTracks = transformAndCleanList(data, favoriteFromSDK) diff --git a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts index b6193d8cb6e..f4ef2595dd0 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts @@ -59,9 +59,9 @@ function* downloadAllFavorites() { // Add favorited tracks from api const sdk = yield* getSDK() - const { data } = yield* call([sdk.users, sdk.users.getFavorites], { + const { data } = (yield* call([sdk.users, sdk.users.getUserFavorites], { id: Id.parse(currentUserId) - }) + })) as import('@audius/sdk').FavoritesResponse const allFavoritedTracks = transformAndCleanList(data, favoriteFromSDK) if (allFavoritedTracks) { diff --git a/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts b/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts index 502f2dd3d51..0acfb5c1a8a 100644 --- a/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts +++ b/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts @@ -22,6 +22,7 @@ import { Storage } from '../../services/Storage' import { StorageNodeSelector } from '../../services/StorageNodeSelector' import { Configuration, Genre, Mood } from '../generated/default' import { PlaylistsApi as GeneratedPlaylistsApi } from '../generated/default/apis/PlaylistsApi' +import type { PlaylistResponse } from '../generated/default/models/PlaylistResponse' import { TrackUploadHelper } from '../tracks/TrackUploadHelper' import { AlbumsApi } from './AlbumsApi' @@ -89,21 +90,20 @@ vitest } as any }) +const mockPlaylistResponse: PlaylistResponse = { + latestChainBlock: 0, + latestIndexedBlock: 0, + latestChainSlotPlays: 0, + latestIndexedSlotPlays: 0, + signature: '', + timestamp: '', + version: { service: 'api', version: '1.0' }, + data: [] +} + vitest .spyOn(GeneratedPlaylistsApi.prototype, 'getPlaylist') - .mockImplementation(async () => { - return { - data: [ - { - playlistName: 'test', - playlistContents: [ - { trackId: 'yyNwXq7', timestamp: 1 }, - { trackId: 'yyNwXq7', timestamp: 1 } - ] - } as any - ] - } - }) + .mockImplementation(async () => mockPlaylistResponse) describe('AlbumsApi', () => { // TODO: Remove this setup in describe 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 134ac6d39eb..cee05b583c2 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,11 +24,33 @@ index.ts models/Access.ts models/AccessGate.ts models/AccessInfoResponse.ts +models/Account.ts +models/AccountCollection.ts +models/AccountCollectionUser.ts models/Activity.ts models/AddManagerRequestBody.ts models/AlbumBacklink.ts models/AlbumsResponse.ts +models/AnnouncementNotification.ts +models/AnnouncementNotificationAction.ts +models/AnnouncementNotificationActionData.ts models/ApproveGrantRequestBody.ts +models/ApproveManagerRequestNotification.ts +models/ApproveManagerRequestNotificationAction.ts +models/ApproveManagerRequestNotificationActionData.ts +models/ArtistCoinFees.ts +models/ArtistLocker.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 @@ -31,41 +58,64 @@ models/BalanceHistoryResponse.ts models/BestSellingItem.ts models/BestSellingResponse.ts models/BlobInfo.ts +models/BulkSubscribersResponse.ts models/ChallengeResponse.ts +models/ChallengeRewardNotification.ts +models/ChallengeRewardNotificationAction.ts +models/ChallengeRewardNotificationActionData.ts +models/CidData.ts +models/CidDataResponse.ts models/ClaimRewardsRequestBody.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 -models/CoinArtistFees.ts -models/CoinArtistLocker.ts -models/CoinDynamicBondingCurve.ts -models/CoinExtensions.ts models/CoinInsights.ts +models/CoinInsightsDynamicBondingCurve.ts +models/CoinInsightsExtensions.ts models/CoinInsightsResponse.ts models/CoinMember.ts models/CoinMembersCountResponse.ts models/CoinMembersResponse.ts models/CoinResponse.ts -models/CoinRewardPool.ts models/CoinsResponse.ts models/CoinsVolumeLeadersResponse.ts models/CoinsVolumeLeadersResponseDataInner.ts models/Collectibles.ts models/CollectiblesResponse.ts -models/CollectionActivity.ts +models/CollectionActivityWithoutTracks.ts +models/CollectionLibraryResponse.ts models/Comment.ts models/CommentEntityType.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/CreateAccessKeyResponse.ts -models/CreateCoinRequestBody.ts +models/CreateCoinRequest.ts models/CreateCoinResponse.ts models/CreateCoinResponseData.ts models/CreateCommentRequestBody.ts @@ -73,29 +123,34 @@ models/CreateCommentResponse.ts models/CreateDeveloperAppRequestBody.ts models/CreateDeveloperAppResponse.ts models/CreateGrantRequestBody.ts +models/CreateNotification.ts +models/CreateNotificationAction.ts +models/CreateNotificationActionData.ts +models/CreatePlaylistNotificationActionData.ts models/CreatePlaylistRequestBody.ts models/CreatePlaylistRequestBodyCopyrightLine.ts models/CreatePlaylistRequestBodyProducerCopyrightLine.ts models/CreatePlaylistResponse.ts -models/CreateRewardCodeRequestBody.ts +models/CreateRewardCodeRequest.ts models/CreateRewardCodeResponse.ts +models/CreateTrackNotificationActionData.ts models/CreateTrackRequestBody.ts models/CreateTrackResponse.ts -models/CreateUserDeveloperAppRequestBody.ts -models/CreateUserDeveloperAppResponse.ts models/CreateUserRequestBody.ts -models/CreateUserRequestBodyEvents.ts models/CreateUserResponse.ts models/DashboardWalletUser.ts models/DashboardWalletUsersResponse.ts +models/DataAndType.ts models/DdexCopyright.ts models/DdexResourceContributor.ts +models/DdexRightsController.ts models/DeactivateAccessKeyRequestBody.ts models/DeactivateAccessKeyResponse.ts models/DecodedUserToken.ts models/DeveloperApp.ts models/DeveloperAppResponse.ts models/DeveloperAppsResponse.ts +models/DynamicBondingCurveInsights.ts models/EmailAccess.ts models/EmailAccessResponse.ts models/Event.ts @@ -105,123 +160,259 @@ 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/FavoriteRequestBody.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/Genre.ts models/GetChallenges.ts models/GetSupportedUsers.ts +models/GetSupporter.ts models/GetSupporters.ts +models/GetSupporting.ts models/GetTipsResponse.ts +models/Grant.ts models/HistoryResponse.ts models/ListenCount.ts -models/MediaLink.ts +models/ListenStreakReminderNotification.ts +models/ListenStreakReminderNotificationAction.ts +models/ListenStreakReminderNotificationActionData.ts +models/ManagedUser.ts +models/ManagedUsersResponse.ts +models/ManagersResponse.ts +models/MilestoneNotification.ts +models/MilestoneNotificationAction.ts +models/MilestoneNotificationActionData.ts models/MonthlyAggregatePlay.ts models/Mood.ts models/MutualFollowersResponse.ts +models/NftCollection.ts +models/NftGate.ts +models/Notification.ts +models/Notifications.ts +models/NotificationsResponse.ts models/PinCommentRequestBody.ts models/Playlist.ts models/PlaylistAddedTimestamp.ts models/PlaylistArtwork.ts +models/PlaylistFeedItem.ts +models/PlaylistLibrary.ts models/PlaylistLibraryExplorePlaylistIdentifier.ts models/PlaylistLibraryFolder.ts models/PlaylistLibraryPlaylistIdentifier.ts +models/PlaylistMilestoneNotificationActionData.ts models/PlaylistResponse.ts models/PlaylistSearchResult.ts models/PlaylistTracksResponse.ts +models/PlaylistUpdate.ts +models/PlaylistUpdates.ts +models/PlaylistUpdatesResponse.ts +models/PlaylistWithoutTracks.ts models/PlaylistsResponse.ts models/PrizeClaimRequestBody.ts models/PrizeClaimResponse.ts models/PrizePublic.ts models/PrizesResponse.ts models/ProfilePicture.ts +models/Purchase.ts +models/PurchaseGate.ts +models/PurchaseSplit.ts +models/PurchasersCountResponse.ts models/PurchasersResponse.ts +models/PurchasesCountResponse.ts +models/PurchasesResponse.ts models/ReactCommentRequestBody.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/RedeemAmountResponse.ts +models/Related.ts models/RelatedArtistResponse.ts +models/Remix.ts +models/RemixNotification.ts +models/RemixNotificationAction.ts +models/RemixNotificationActionData.ts models/RemixParent.ts models/RemixParentWrite.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/RepostRequestBody.ts models/Reposts.ts +models/RequestManagerNotification.ts +models/RequestManagerNotificationAction.ts +models/RequestManagerNotificationActionData.ts models/RewardCodeErrorResponse.ts models/RewardCodeResponse.ts +models/RewardPool.ts models/SaleJson.ts 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/SearchModel.ts +models/SearchPlaylist.ts +models/SearchResponse.ts +models/SearchTrack.ts +models/SendTipNotification.ts +models/SendTipNotificationAction.ts +models/SendTipNotificationActionData.ts models/Stem.ts -models/StemCategory.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/SupporterReference.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/TopGenreUsersResponse.ts models/TopListener.ts +models/TopUsersResponse.ts models/Track.ts models/TrackAccessInfo.ts models/TrackActivity.ts +models/TrackAddedToPlaylistNotification.ts +models/TrackAddedToPlaylistNotificationAction.ts +models/TrackAddedToPlaylistNotificationActionData.ts +models/TrackAddedToPurchasedAlbumNotification.ts +models/TrackAddedToPurchasedAlbumNotificationAction.ts +models/TrackAddedToPurchasedAlbumNotificationActionData.ts models/TrackArtwork.ts models/TrackCommentCountResponse.ts models/TrackCommentNotificationResponse.ts models/TrackCommentsResponse.ts models/TrackDownloadRequestBody.ts -models/TrackElement.ts models/TrackElementWrite.ts models/TrackFavoritesResponse.ts +models/TrackFeedItem.ts models/TrackId.ts models/TrackInspect.ts models/TrackInspectList.ts +models/TrackLibraryResponse.ts +models/TrackMilestoneNotificationActionData.ts models/TrackRepostsResponse.ts models/TrackResponse.ts models/TrackSearch.ts +models/TrackSegment.ts +models/Tracks.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/UpdateCoinRequestBody.ts +models/UpdateCoinRequest.ts models/UpdateCoinResponse.ts models/UpdateCommentRequestBody.ts models/UpdateDeveloperAppRequestBody.ts models/UpdatePlaylistRequestBody.ts models/UpdateTrackRequestBody.ts models/UpdateUserRequestBody.ts +models/UpdateUserRequestBodyEvents.ts +models/UrlWithMirrors.ts +models/UsdcGate.ts +models/UsdcPurchaseBuyerNotification.ts +models/UsdcPurchaseBuyerNotificationAction.ts +models/UsdcPurchaseBuyerNotificationActionData.ts +models/UsdcPurchaseSellerNotification.ts +models/UsdcPurchaseSellerNotificationAction.ts +models/UsdcPurchaseSellerNotificationActionData.ts models/User.ts +models/UserAccountResponse.ts +models/UserArtistCoinBadge.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/UserIdAddress.ts models/UserIdsAddressesResponse.ts +models/UserManager.ts +models/UserMilestoneNotificationActionData.ts models/UserPlaylistLibrary.ts models/UserPlaylistLibraryContentsInner.ts models/UserResponse.ts +models/UserResponseSingle.ts models/UserSearch.ts +models/UserSubscribers.ts models/UserTrackListenCountsResponse.ts models/UserTracksRemixedResponse.ts -models/UsersResponse.ts models/VerifyToken.ts +models/VersionMetadata.ts models/WriteResponse.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/CoinsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/CoinsApi.ts index fb26e551c03..b5fee049630 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/CoinsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/CoinsApi.ts @@ -23,12 +23,12 @@ import type { CoinResponse, CoinsResponse, CoinsVolumeLeadersResponse, - CreateCoinRequestBody, + CreateCoinRequest, CreateCoinResponse, RedeemAmountResponse, RewardCodeErrorResponse, RewardCodeResponse, - UpdateCoinRequestBody, + UpdateCoinRequest, UpdateCoinResponse, } from '../models'; import { @@ -46,8 +46,8 @@ import { CoinsResponseToJSON, CoinsVolumeLeadersResponseFromJSON, CoinsVolumeLeadersResponseToJSON, - CreateCoinRequestBodyFromJSON, - CreateCoinRequestBodyToJSON, + CreateCoinRequestFromJSON, + CreateCoinRequestToJSON, CreateCoinResponseFromJSON, CreateCoinResponseToJSON, RedeemAmountResponseFromJSON, @@ -56,8 +56,8 @@ import { RewardCodeErrorResponseToJSON, RewardCodeResponseFromJSON, RewardCodeResponseToJSON, - UpdateCoinRequestBodyFromJSON, - UpdateCoinRequestBodyToJSON, + UpdateCoinRequestFromJSON, + UpdateCoinRequestToJSON, UpdateCoinResponseFromJSON, UpdateCoinResponseToJSON, } from '../models'; @@ -73,9 +73,9 @@ export interface ClaimCoinRewardCodeRequest { userId: string; } -export interface CreateCoinRequest { +export interface CreateCoinOperationRequest { userId: string; - metadata: CreateCoinRequestBody; + createCoinRequest: CreateCoinRequest; } export interface GetCoinRequest { @@ -106,12 +106,12 @@ export interface GetCoinRedeemAmountRequest { } export interface GetCoinsRequest { + ticker?: Array; mint?: Array; ownerId?: Array; - ticker?: Array; - query?: string; - offset?: number; limit?: number; + offset?: number; + query?: string; sortMethod?: GetCoinsSortMethodEnum; sortDirection?: GetCoinsSortDirectionEnum; } @@ -128,10 +128,10 @@ export interface GetVolumeLeadersRequest { limit?: number; } -export interface UpdateCoinRequest { +export interface UpdateCoinOperationRequest { mint: string; userId: string; - metadata: UpdateCoinRequestBody; + updateCoinRequest: UpdateCoinRequest; } /** @@ -225,13 +225,13 @@ export class CoinsApi extends runtime.BaseAPI { * @hidden * Creates a new artist coin */ - async createCoinRaw(params: CreateCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createCoinRaw(params: CreateCoinOperationRequest, 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 createCoin.'); } - if (params.metadata === null || params.metadata === undefined) { - throw new runtime.RequiredError('metadata','Required parameter params.metadata was null or undefined when calling createCoin.'); + if (params.createCoinRequest === null || params.createCoinRequest === undefined) { + throw new runtime.RequiredError('createCoinRequest','Required parameter params.createCoinRequest was null or undefined when calling createCoin.'); } const queryParameters: any = {}; @@ -249,7 +249,7 @@ export class CoinsApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: CreateCoinRequestBodyToJSON(params.metadata), + body: CreateCoinRequestToJSON(params.createCoinRequest), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CreateCoinResponseFromJSON(jsonValue)); @@ -258,7 +258,7 @@ export class CoinsApi extends runtime.BaseAPI { /** * Creates a new artist coin */ - async createCoin(params: CreateCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async createCoin(params: CreateCoinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createCoinRaw(params, initOverrides); return await response.value(); } @@ -463,11 +463,15 @@ export class CoinsApi extends runtime.BaseAPI { /** * @hidden - * Gets information about coins + * Gets a list of coins with optional filtering */ async getCoinsRaw(params: GetCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; + if (params.ticker) { + queryParameters['ticker'] = params.ticker; + } + if (params.mint) { queryParameters['mint'] = params.mint; } @@ -476,20 +480,16 @@ export class CoinsApi extends runtime.BaseAPI { queryParameters['owner_id'] = params.ownerId; } - if (params.ticker) { - queryParameters['ticker'] = params.ticker; - } - - if (params.query !== undefined) { - queryParameters['query'] = params.query; + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; } 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) { @@ -513,7 +513,7 @@ export class CoinsApi extends runtime.BaseAPI { } /** - * Gets information about coins + * Gets a list of coins with optional filtering */ async getCoins(params: GetCoinsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getCoinsRaw(params, initOverrides); @@ -602,7 +602,7 @@ export class CoinsApi extends runtime.BaseAPI { * @hidden * Updates information about a specific coin by its mint address */ - async updateCoinRaw(params: UpdateCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateCoinRaw(params: UpdateCoinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.mint === null || params.mint === undefined) { throw new runtime.RequiredError('mint','Required parameter params.mint was null or undefined when calling updateCoin.'); } @@ -611,8 +611,8 @@ export class CoinsApi extends runtime.BaseAPI { throw new runtime.RequiredError('userId','Required parameter params.userId was null or undefined when calling updateCoin.'); } - if (params.metadata === null || params.metadata === undefined) { - throw new runtime.RequiredError('metadata','Required parameter params.metadata was null or undefined when calling updateCoin.'); + if (params.updateCoinRequest === null || params.updateCoinRequest === undefined) { + throw new runtime.RequiredError('updateCoinRequest','Required parameter params.updateCoinRequest was null or undefined when calling updateCoin.'); } const queryParameters: any = {}; @@ -630,7 +630,7 @@ export class CoinsApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: UpdateCoinRequestBodyToJSON(params.metadata), + body: UpdateCoinRequestToJSON(params.updateCoinRequest), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UpdateCoinResponseFromJSON(jsonValue)); @@ -639,7 +639,7 @@ export class CoinsApi extends runtime.BaseAPI { /** * Updates information about a specific coin by its mint address */ - async updateCoin(params: UpdateCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async updateCoin(params: UpdateCoinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.updateCoinRaw(params, initOverrides); return await response.value(); } @@ -659,8 +659,8 @@ export type GetCoinMembersSortDirectionEnum = typeof GetCoinMembersSortDirection */ export const GetCoinsSortMethodEnum = { MarketCap: 'market_cap', - Volume: 'volume', Price: 'price', + Volume: 'volume', CreatedAt: 'created_at', Holder: 'holder' } as const; diff --git a/packages/sdk/src/sdk/api/generated/default/apis/ExploreApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/ExploreApi.ts index 1971c120e1c..5f14a2916f0 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/ExploreApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/ExploreApi.ts @@ -37,8 +37,8 @@ export class ExploreApi extends runtime.BaseAPI { /** * @hidden - * Get best selling tracks and playlists - * Get best selling tracks and/or albums + * Get best selling tracks and/or albums with related entities + * Get best selling tracks and playlists with related entities */ async getBestSellingRaw(params: GetBestSellingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; @@ -72,8 +72,8 @@ export class ExploreApi extends runtime.BaseAPI { } /** - * Get best selling tracks and playlists - * Get best selling tracks and/or albums + * Get best selling tracks and/or albums with related entities + * Get best selling tracks and playlists with related entities */ async getBestSelling(params: GetBestSellingRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getBestSellingRaw(params, initOverrides); 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 b1cfe4d0c37..d27555190d1 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts @@ -20,6 +20,7 @@ import type { CreatePlaylistRequestBody, CreatePlaylistResponse, FavoriteRequestBody, + FollowingResponse, PlaylistResponse, PlaylistSearchResult, PlaylistTracksResponse, @@ -37,6 +38,8 @@ import { CreatePlaylistResponseToJSON, FavoriteRequestBodyFromJSON, FavoriteRequestBodyToJSON, + FollowingResponseFromJSON, + FollowingResponseToJSON, PlaylistResponseFromJSON, PlaylistResponseToJSON, PlaylistSearchResultFromJSON, @@ -104,6 +107,28 @@ export interface GetTrendingPlaylistsRequest { omitTracks?: boolean; } +export interface GetTrendingPlaylistsWithVersionRequest { + version: string; + offset?: number; + limit?: number; + userId?: string; + time?: GetTrendingPlaylistsWithVersionTimeEnum; +} + +export interface GetUsersFromPlaylistFavoritesRequest { + playlistId: string; + offset?: number; + limit?: number; + userId?: string; +} + +export interface GetUsersFromPlaylistRepostsRequest { + playlistId: string; + offset?: number; + limit?: number; + userId?: string; +} + export interface RepostPlaylistRequest { playlistId: string; userId: string; @@ -484,7 +509,7 @@ export class PlaylistsApi extends runtime.BaseAPI { /** * @hidden - * Gets trending playlists for a time period + * Returns trending playlists for a time period */ async getTrendingPlaylistsRaw(params: GetTrendingPlaylistsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; @@ -526,13 +551,146 @@ export class PlaylistsApi extends runtime.BaseAPI { } /** - * Gets trending playlists for a time period + * Returns trending playlists for a time period */ async getTrendingPlaylists(params: GetTrendingPlaylistsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getTrendingPlaylistsRaw(params, initOverrides); 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) => TrendingPlaylistsResponseFromJSON(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 + * Get users that favorited a playlist + */ + async getUsersFromPlaylistFavoritesRaw(params: GetUsersFromPlaylistFavoritesRequest, 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 getUsersFromPlaylistFavorites.'); + } + + 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: `/playlists/{playlist_id}/favorites`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FollowingResponseFromJSON(jsonValue)); + } + + /** + * Get users that favorited a playlist + */ + async getUsersFromPlaylistFavorites(params: GetUsersFromPlaylistFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUsersFromPlaylistFavoritesRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get users that reposted a playlist + */ + async getUsersFromPlaylistRepostsRaw(params: GetUsersFromPlaylistRepostsRequest, 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 getUsersFromPlaylistReposts.'); + } + + 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: `/playlists/{playlist_id}/reposts`.replace(`{${"playlist_id"}}`, encodeURIComponent(String(params.playlistId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FollowingResponseFromJSON(jsonValue)); + } + + /** + * Get users that reposted a playlist + */ + async getUsersFromPlaylistReposts(params: GetUsersFromPlaylistRepostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUsersFromPlaylistRepostsRaw(params, initOverrides); + return await response.value(); + } + /** * @hidden * Repost a playlist @@ -872,6 +1030,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/RewardsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/RewardsApi.ts index 8b421c67625..24ce7206d97 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/RewardsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/RewardsApi.ts @@ -18,7 +18,7 @@ import * as runtime from '../runtime'; import type { ClaimRewardsRequestBody, ClaimRewardsResponse, - CreateRewardCodeRequestBody, + CreateRewardCodeRequest, CreateRewardCodeResponse, } from '../models'; import { @@ -26,8 +26,8 @@ import { ClaimRewardsRequestBodyToJSON, ClaimRewardsResponseFromJSON, ClaimRewardsResponseToJSON, - CreateRewardCodeRequestBodyFromJSON, - CreateRewardCodeRequestBodyToJSON, + CreateRewardCodeRequestFromJSON, + CreateRewardCodeRequestToJSON, CreateRewardCodeResponseFromJSON, CreateRewardCodeResponseToJSON, } from '../models'; @@ -36,8 +36,8 @@ export interface ClaimRewardsRequest { reward: ClaimRewardsRequestBody; } -export interface CreateRewardCodeRequest { - body?: CreateRewardCodeRequestBody; +export interface CreateRewardCodeOperationRequest { + createRewardCodeRequest: CreateRewardCodeRequest; } /** @@ -83,7 +83,11 @@ export class RewardsApi extends runtime.BaseAPI { * @hidden * Creates a new reward code with Solana signature verification */ - async createRewardCodeRaw(params: CreateRewardCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createRewardCodeRaw(params: CreateRewardCodeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.createRewardCodeRequest === null || params.createRewardCodeRequest === undefined) { + throw new runtime.RequiredError('createRewardCodeRequest','Required parameter params.createRewardCodeRequest was null or undefined when calling createRewardCode.'); + } + const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -95,7 +99,7 @@ export class RewardsApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: CreateRewardCodeRequestBodyToJSON(params.body), + body: CreateRewardCodeRequestToJSON(params.createRewardCodeRequest), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CreateRewardCodeResponseFromJSON(jsonValue)); @@ -104,7 +108,7 @@ export class RewardsApi extends runtime.BaseAPI { /** * Creates a new reward code with Solana signature verification */ - async createRewardCode(params: CreateRewardCodeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async createRewardCode(params: CreateRewardCodeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createRewardCodeRaw(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..32691916b18 --- /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, + SearchResponse, +} from '../models'; +import { + SearchAutocompleteResponseFromJSON, + SearchAutocompleteResponseToJSON, + SearchResponseFromJSON, + SearchResponseToJSON, +} 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) => SearchResponseFromJSON(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) => SearchResponseFromJSON(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 d7f6d92dfd8..5561776d059 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts @@ -20,6 +20,7 @@ import type { CreateTrackRequestBody, CreateTrackResponse, FavoriteRequestBody, + RemixablesResponse, RemixesResponse, RemixingResponse, RepostRequestBody, @@ -50,6 +51,8 @@ import { CreateTrackResponseToJSON, FavoriteRequestBodyFromJSON, FavoriteRequestBodyToJSON, + RemixablesResponseFromJSON, + RemixablesResponseToJSON, RemixesResponseFromJSON, RemixesResponseToJSON, RemixingResponseFromJSON, @@ -117,11 +120,18 @@ export interface FavoriteTrackRequest { metadata?: FavoriteRequestBody; } +export interface GetBestNewReleasesRequest { + window: GetBestNewReleasesWindowEnum; + userId?: string; + limit?: number; + withUsers?: boolean; +} + export interface GetBulkTracksRequest { + userId?: string; permalink?: Array; id?: Array; isrc?: Array; - userId?: string; } export interface GetFeelingLuckyTracksRequest { @@ -131,6 +141,12 @@ export interface GetFeelingLuckyTracksRequest { minFollowers?: number; } +export interface GetMostLovedTracksRequest { + userId?: string; + limit?: number; + withUsers?: boolean; +} + export interface GetMostSharedTracksRequest { userId?: string; limit?: number; @@ -161,6 +177,12 @@ export interface GetRecommendedTracksWithVersionRequest { userId?: string; } +export interface GetRemixableTracksRequest { + limit?: number; + userId?: string; + withUsers?: boolean; +} + export interface GetTrackRequest { trackId: string; userId?: string; @@ -232,9 +254,9 @@ export interface GetTrendingTrackIDsRequest { export interface GetTrendingTracksRequest { offset?: number; limit?: number; + userId?: string; genre?: string; time?: GetTrendingTracksTimeEnum; - userId?: string; } export interface GetTrendingTracksIDsWithVersionRequest { @@ -280,6 +302,15 @@ export interface GetTrendingWinnersRequest { userId?: string; } +export interface GetUnderTheRadarTracksRequest { + offset?: number; + limit?: number; + userId?: string; + filter?: GetUnderTheRadarTracksFilterEnum; + tracksOnly?: boolean; + withUsers?: boolean; +} + export interface GetUndergroundTrendingTracksRequest { offset?: number; limit?: number; @@ -592,6 +623,53 @@ export class TracksApi extends runtime.BaseAPI { 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) => TracksResponseFromJSON(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 @@ -599,6 +677,10 @@ export class TracksApi extends runtime.BaseAPI { async getBulkTracksRaw(params: GetBulkTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + if (params.permalink) { queryParameters['permalink'] = params.permalink; } @@ -611,10 +693,6 @@ export class TracksApi extends runtime.BaseAPI { queryParameters['isrc'] = params.isrc; } - if (params.userId !== undefined) { - queryParameters['user_id'] = params.userId; - } - const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ @@ -678,6 +756,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) => TracksResponseFromJSON(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 @@ -860,7 +977,46 @@ export class TracksApi extends runtime.BaseAPI { /** * @hidden - * Gets a track by ID + * 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. */ async getTrackRaw(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.trackId === null || params.trackId === undefined) { @@ -886,7 +1042,7 @@ export class TracksApi extends runtime.BaseAPI { } /** - * Gets a track by ID + * Gets a track by ID. */ async getTrack(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getTrackRaw(params, initOverrides); @@ -1310,6 +1466,10 @@ export class TracksApi extends runtime.BaseAPI { queryParameters['limit'] = params.limit; } + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + if (params.genre !== undefined) { queryParameters['genre'] = params.genre; } @@ -1318,10 +1478,6 @@ export class TracksApi extends runtime.BaseAPI { queryParameters['time'] = params.time; } - if (params.userId !== undefined) { - queryParameters['user_id'] = params.userId; - } - const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ @@ -1536,7 +1692,7 @@ export class TracksApi extends runtime.BaseAPI { /** * @hidden - * Gets weekly trending underground winners from the trending_results table. Returns full track objects for the specified week. Defaults to the most recent week with data when no week is provided. + * Gets weekly trending underground winners from the trending_results table. Returns track objects for the specified week. Defaults to the most recent week with data when no week is provided. */ async getTrendingUndergroundWinnersRaw(params: GetTrendingUndergroundWinnersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; @@ -1562,7 +1718,7 @@ export class TracksApi extends runtime.BaseAPI { } /** - * Gets weekly trending underground winners from the trending_results table. Returns full track objects for the specified week. Defaults to the most recent week with data when no week is provided. + * Gets weekly trending underground winners from the trending_results table. Returns track objects for the specified week. Defaults to the most recent week with data when no week is provided. */ async getTrendingUndergroundWinners(params: GetTrendingUndergroundWinnersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getTrendingUndergroundWinnersRaw(params, initOverrides); @@ -1571,7 +1727,7 @@ export class TracksApi extends runtime.BaseAPI { /** * @hidden - * Gets weekly trending winners from the trending_results table. Returns full track objects for the specified week. Defaults to the most recent week with data when no week is provided. + * Gets weekly trending winners from the trending_results table. Returns track objects for the specified week. Defaults to the most recent week with data when no week is provided. */ async getTrendingWinnersRaw(params: GetTrendingWinnersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; @@ -1597,13 +1753,64 @@ export class TracksApi extends runtime.BaseAPI { } /** - * Gets weekly trending winners from the trending_results table. Returns full track objects for the specified week. Defaults to the most recent week with data when no week is provided. + * Gets weekly trending winners from the trending_results table. Returns track objects for the specified week. Defaults to the most recent week with data when no week is provided. */ async getTrendingWinners(params: GetTrendingWinnersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getTrendingWinnersRaw(params, initOverrides); 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) => TracksResponseFromJSON(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 @@ -2309,6 +2516,15 @@ export class TracksApi extends runtime.BaseAPI { } +/** + * @export + */ +export const GetBestNewReleasesWindowEnum = { + Week: 'week', + Month: 'month', + Year: 'year' +} as const; +export type GetBestNewReleasesWindowEnum = typeof GetBestNewReleasesWindowEnum[keyof typeof GetBestNewReleasesWindowEnum]; /** * @export */ @@ -2396,6 +2612,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 9b1e8507c79..d4da7fd87af 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts @@ -21,7 +21,9 @@ import type { ApproveGrantRequestBody, AuthorizedApps, BalanceHistoryResponse, + BulkSubscribersResponse, CollectiblesResponse, + CollectionLibraryResponse, ConnectedWalletsResponse, CreateGrantRequestBody, CreateUserRequestBody, @@ -32,30 +34,45 @@ import type { FollowingResponse, GetChallenges, GetSupportedUsers, + GetSupporter, GetSupporters, + GetSupporting, HistoryResponse, + ManagedUsersResponse, + ManagersResponse, MutualFollowersResponse, PlaylistsResponse, + PurchasersCountResponse, PurchasersResponse, + PurchasesCountResponse, + PurchasesResponse, RelatedArtistResponse, + RemixersCountResponse, RemixersResponse, Reposts, SalesAggregateResponse, SalesJsonResponse, SubscribersResponse, TagsResponse, + TopGenreUsersResponse, + TopUsersResponse, + TrackLibraryResponse, + Tracks, TracksCountResponse, - TracksResponse, + TransactionHistoryCountResponse, + TransactionHistoryResponse, UpdateUserRequestBody, + UserAccountResponse, UserCoinResponse, UserCoinsResponse, UserCommentsResponse, + UserFeedResponse, UserIdsAddressesResponse, UserResponse, + UserResponseSingle, UserSearch, UserTrackListenCountsResponse, UserTracksRemixedResponse, - UsersResponse, VerifyToken, WriteResponse, } from '../models'; @@ -70,8 +87,12 @@ import { AuthorizedAppsToJSON, BalanceHistoryResponseFromJSON, BalanceHistoryResponseToJSON, + BulkSubscribersResponseFromJSON, + BulkSubscribersResponseToJSON, CollectiblesResponseFromJSON, CollectiblesResponseToJSON, + CollectionLibraryResponseFromJSON, + CollectionLibraryResponseToJSON, ConnectedWalletsResponseFromJSON, ConnectedWalletsResponseToJSON, CreateGrantRequestBodyFromJSON, @@ -92,18 +113,34 @@ import { GetChallengesToJSON, GetSupportedUsersFromJSON, GetSupportedUsersToJSON, + GetSupporterFromJSON, + GetSupporterToJSON, GetSupportersFromJSON, GetSupportersToJSON, + GetSupportingFromJSON, + GetSupportingToJSON, 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, @@ -116,30 +153,44 @@ import { SubscribersResponseToJSON, TagsResponseFromJSON, TagsResponseToJSON, + TopGenreUsersResponseFromJSON, + TopGenreUsersResponseToJSON, + TopUsersResponseFromJSON, + TopUsersResponseToJSON, + TrackLibraryResponseFromJSON, + TrackLibraryResponseToJSON, + TracksFromJSON, + TracksToJSON, TracksCountResponseFromJSON, TracksCountResponseToJSON, - TracksResponseFromJSON, - TracksResponseToJSON, + TransactionHistoryCountResponseFromJSON, + TransactionHistoryCountResponseToJSON, + TransactionHistoryResponseFromJSON, + TransactionHistoryResponseToJSON, UpdateUserRequestBodyFromJSON, UpdateUserRequestBodyToJSON, + UserAccountResponseFromJSON, + UserAccountResponseToJSON, UserCoinResponseFromJSON, UserCoinResponseToJSON, UserCoinsResponseFromJSON, UserCoinsResponseToJSON, UserCommentsResponseFromJSON, UserCommentsResponseToJSON, + UserFeedResponseFromJSON, + UserFeedResponseToJSON, UserIdsAddressesResponseFromJSON, UserIdsAddressesResponseToJSON, UserResponseFromJSON, UserResponseToJSON, + UserResponseSingleFromJSON, + UserResponseSingleToJSON, UserSearchFromJSON, UserSearchToJSON, UserTrackListenCountsResponseFromJSON, UserTrackListenCountsResponseToJSON, UserTracksRemixedResponseFromJSON, UserTracksRemixedResponseToJSON, - UsersResponseFromJSON, - UsersResponseToJSON, VerifyTokenFromJSON, VerifyTokenToJSON, WriteResponseFromJSON, @@ -156,6 +207,14 @@ export interface ApproveGrantRequest { approveGrantRequestBody: ApproveGrantRequestBody; } +export interface BulkGetSubscribersRequest { + ids: Array; +} + +export interface BulkGetSubscribersViaJSONRequestRequest { + ids: Array; +} + export interface CreateGrantRequest { id: string; createGrantRequestBody: CreateGrantRequestBody; @@ -224,6 +283,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; } @@ -237,10 +312,6 @@ export interface GetConnectedWalletsRequest { id: string; } -export interface GetFavoritesRequest { - id: string; -} - export interface GetFollowersRequest { id: string; offset?: number; @@ -255,6 +326,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; @@ -288,6 +375,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; @@ -304,6 +420,12 @@ export interface GetRemixersRequest { trackId?: string; } +export interface GetRemixersCountRequest { + id: string; + userId?: string; + trackId?: string; +} + export interface GetRepostsRequest { id: string; offset?: number; @@ -311,6 +433,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; @@ -320,6 +461,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; @@ -334,6 +483,12 @@ export interface GetSupportedUsersRequest { userId?: string; } +export interface GetSupporterRequest { + id: string; + supporterUserId: string; + userId?: string; +} + export interface GetSupportersRequest { id: string; offset?: number; @@ -341,12 +496,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; @@ -385,11 +558,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; @@ -437,10 +638,76 @@ export interface GetUserEmailKeyRequest { grantorUserId: string; } +export interface GetUserFavoriteTracksRequest { + id: string; + offset?: number; + limit?: number; + userId?: string; + query?: string; + sortMethod?: GetUserFavoriteTracksSortMethodEnum; + sortDirection?: GetUserFavoriteTracksSortDirectionEnum; +} + +export interface GetUserFavoritesRequest { + id: 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; @@ -631,6 +898,76 @@ export class UsersApi extends runtime.BaseAPI { return await response.value(); } + /** + * @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) => BulkSubscribersResponseFromJSON(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) => BulkSubscribersResponseFromJSON(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 * Create a grant (authorize an app to act on the user\'s behalf) @@ -952,7 +1289,7 @@ export class UsersApi extends runtime.BaseAPI { * @hidden * Gets the AI generated tracks attributed to a user using the user\'s handle */ - async getAIAttributedTracksByUserHandleRaw(params: GetAIAttributedTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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.'); } @@ -1008,13 +1345,13 @@ export class UsersApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksFromJSON(jsonValue)); } /** * Gets the AI generated tracks attributed to a user using the user\'s handle */ - async getAIAttributedTracksByUserHandle(params: GetAIAttributedTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getAIAttributedTracksByUserHandle(params: GetAIAttributedTracksByUserHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getAIAttributedTracksByUserHandleRaw(params, initOverrides); return await response.value(); } @@ -1080,77 +1417,105 @@ export class UsersApi extends runtime.BaseAPI { /** * @hidden - * Get the apps that user has authorized to write to their account + * Gets the count of the user\'s $AUDIO transaction history within the App */ - async getAuthorizedAppsRaw(params: GetAuthorizedAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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 getAuthorizedApps.'); + 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}/authorized_apps`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + 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) => AuthorizedAppsFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryCountResponseFromJSON(jsonValue)); } /** - * Get the apps that user has authorized to write to their account + * Gets the count of the user\'s $AUDIO transaction history within the App */ - async getAuthorizedApps(params: GetAuthorizedAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAuthorizedAppsRaw(params, initOverrides); + async getAudioTransactionCount(params: GetAudioTransactionCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAudioTransactionCountRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets a list of users by ID + * Gets the user\'s $AUDIO transaction history within the App */ - async getBulkUsersRaw(params: GetBulkUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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.userId !== undefined) { - queryParameters['user_id'] = params.userId; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; } - if (params.id) { - queryParameters['id'] = params.id; + 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`, + path: `/users/{id}/transactions/audio`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UsersResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionHistoryResponseFromJSON(jsonValue)); } /** - * Gets a list of users by ID + * Gets the user\'s $AUDIO transaction history within the App */ - async getBulkUsers(params: GetBulkUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getBulkUsersRaw(params, initOverrides); + async getAudioTransactions(params: GetAudioTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAudioTransactionsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the User\'s ERC and SPL connected wallets + * Get the apps that user has authorized to write to their account */ - async getConnectedWalletsRaw(params: GetConnectedWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getAuthorizedAppsRaw(params: GetAuthorizedAppsRequest, 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 getConnectedWallets.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getAuthorizedApps.'); } const queryParameters: any = {}; @@ -1158,30 +1523,65 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/connected_wallets`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/authorized_apps`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectedWalletsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => AuthorizedAppsFromJSON(jsonValue)); } /** - * Get the User\'s ERC and SPL connected wallets + * Get the apps that user has authorized to write to their account */ - async getConnectedWallets(params: GetConnectedWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConnectedWalletsRaw(params, initOverrides); + async getAuthorizedApps(params: GetAuthorizedAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAuthorizedAppsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets a user\'s favorite tracks + * Gets a list of users by ID + */ + async getBulkUsersRaw(params: GetBulkUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.id) { + queryParameters['id'] = params.id; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of users by ID + */ + async getBulkUsers(params: GetBulkUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getBulkUsersRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the User\'s ERC and SPL connected wallets */ - async getFavoritesRaw(params: GetFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getConnectedWalletsRaw(params: GetConnectedWalletsRequest, 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 getFavorites.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getConnectedWallets.'); } const queryParameters: any = {}; @@ -1189,20 +1589,20 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/favorites`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/connected_wallets`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => FavoritesResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectedWalletsResponseFromJSON(jsonValue)); } /** - * Gets a user\'s favorite tracks + * Get the User\'s ERC and SPL connected wallets */ - async getFavorites(params: GetFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFavoritesRaw(params, initOverrides); + async getConnectedWallets(params: GetConnectedWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConnectedWalletsRaw(params, initOverrides); return await response.value(); } @@ -1292,11 +1692,105 @@ 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 */ - async getMutedUsersRaw(params: GetMutedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getMutedUsersRaw(params: GetMutedUsersRequest, 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 getMutedUsers.'); } @@ -1320,13 +1814,13 @@ export class UsersApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UsersResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue)); } /** * Gets users muted by the given user */ - async getMutedUsers(params: GetMutedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getMutedUsers(params: GetMutedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getMutedUsersRaw(params, initOverrides); return await response.value(); } @@ -1486,11 +1980,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 = {}; @@ -1507,37 +2001,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 = {}; @@ -1554,80 +2052,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; + } + + 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 = {}; @@ -1644,41 +2162,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 = {}; @@ -1695,76 +2209,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 = {}; @@ -1784,35 +2298,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; } @@ -1824,31 +2341,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) => RepostsFromJSON(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 = {}; @@ -1865,14 +2381,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; } @@ -1881,12 +2389,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 = {}; @@ -1900,30 +2404,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 = {}; @@ -1940,26 +2444,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) { @@ -1971,30 +2455,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 = {}; @@ -2003,12 +2487,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 = {}; @@ -2022,34 +2502,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; } @@ -2057,44 +2545,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) { @@ -2103,39 +2587,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 = {}; @@ -2147,170 +2627,1186 @@ 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) => GetSupporterFromJSON(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) => GetSupportingFromJSON(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; } + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/coins`.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) => UserCoinsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TagsResponseFromJSON(jsonValue)); } /** - * 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 getUserCoins(params: GetUserCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCoinsRaw(params, initOverrides); + async getTopTrackTags(params: GetTopTrackTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopTrackTagsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the User\'s indexed collectibles data + * Get the Top Users having at least one track by follower count */ - 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.'); + async getTopUsersRaw(params: GetTopUsersRequest, 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; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/top`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopUsersResponseFromJSON(jsonValue)); + } + + /** + * Get the Top Users having at least one track by follower count + */ + async getTopUsers(params: GetTopUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopUsersRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the Top Users for a Given Genre + */ + async getTopUsersInGenreRaw(params: GetTopUsersInGenreRequest, 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.genre) { + queryParameters['genre'] = params.genre; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/genre/top`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopGenreUsersResponseFromJSON(jsonValue)); + } + + /** + * Get the Top Users for a Given Genre + */ + async getTopUsersInGenre(params: GetTopUsersInGenreRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopUsersInGenreRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the tracks created by a user using their user ID + */ + 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.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.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; + } + + 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`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TracksFromJSON(jsonValue)); + } + + /** + * Gets the tracks created by a user using their user ID + */ + async getTracksByUser(params: GetTracksByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTracksByUserRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the tracks created by a user using the user\'s handle + */ + 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 = {}; + + 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.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) => TracksFromJSON(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) => UserResponseSingleFromJSON(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) => UserAccountResponseFromJSON(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) => UserResponseSingleFromJSON(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 a user\'s favorite tracks + */ + async getUserFavoriteTracksRaw(params: GetUserFavoriteTracksRequest, 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 getUserFavoriteTracks.'); + } + + 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) => TrackLibraryResponseFromJSON(jsonValue)); + } + + /** + * Gets a user\'s favorite tracks + */ + async getUserFavoriteTracks(params: GetUserFavoriteTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserFavoriteTracksRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a user\'s favorite tracks + */ + async getUserFavoritesRaw(params: GetUserFavoritesRequest, 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 getUserFavorites.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/{id}/favorites`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FavoritesResponseFromJSON(jsonValue)); + } + + /** + * Gets a user\'s favorite tracks + */ + async getUserFavorites(params: GetUserFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserFavoritesRaw(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; } - const queryParameters: any = {}; + 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}/collectibles`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/library/albums`.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) => CollectionLibraryResponseFromJSON(jsonValue)); } /** - * Get the User\'s indexed collectibles data + * Gets a user\'s saved/reposted/purchased/all albums + * Fetch a user\'s full library playlists */ - async getUserCollectibles(params: GetUserCollectiblesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCollectiblesRaw(params, initOverrides); + async getUserLibraryAlbums(params: GetUserLibraryAlbumsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryAlbumsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get user comment history + * Gets a user\'s saved/reposted/purchased/all playlists + * Fetch a user\'s full library playlists */ - async getUserCommentsRaw(params: GetUserCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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 getUserComments.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserLibraryPlaylists.'); } const queryParameters: any = {}; @@ -2327,93 +3823,117 @@ export class UsersApi extends runtime.BaseAPI { 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}/comments`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/library/playlists`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserCommentsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => CollectionLibraryResponseFromJSON(jsonValue)); } /** - * Get user comment history + * Gets a user\'s saved/reposted/purchased/all playlists + * Fetch a user\'s full library playlists */ - async getUserComments(params: GetUserCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCommentsRaw(params, initOverrides); + async getUserLibraryPlaylists(params: GetUserLibraryPlaylistsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryPlaylistsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the encrypted key for email access between the receiving user and granting user. + * Gets a user\'s saved/reposted/purchased/all tracks + * Fetch a user\'s full library tracks */ - 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.'); + 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 = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } - 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); + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } - return new runtime.JSONApiResponse(response, (jsonValue) => EmailAccessResponseFromJSON(jsonValue)); - } + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } - /** - * 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(); - } + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } - /** - * @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.'); + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; } - const queryParameters: any = {}; + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } - if (params.address) { - queryParameters['address'] = params.address; + 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/address`, + path: `/users/{id}/library/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UserIdsAddressesResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TrackLibraryResponseFromJSON(jsonValue)); } /** - * Gets User IDs from any Ethereum wallet address or Solana account address associated with their Audius account. + * Gets a user\'s saved/reposted/purchased/all tracks + * Fetch a user\'s full library tracks */ - async getUserIDsByAddresses(params: GetUserIDsByAddressesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserIDsByAddressesRaw(params, initOverrides); + async getUserLibraryTracks(params: GetUserLibraryTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryTracksRaw(params, initOverrides); return await response.value(); } @@ -2468,7 +3988,7 @@ export class UsersApi extends runtime.BaseAPI { * @hidden * Gets the recommended tracks for the user */ - async getUserRecommendedTracksRaw(params: GetUserRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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.'); } @@ -2500,13 +4020,13 @@ export class UsersApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksFromJSON(jsonValue)); } /** * Gets the recommended tracks for the user */ - async getUserRecommendedTracks(params: GetUserRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getUserRecommendedTracks(params: GetUserRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getUserRecommendedTracksRaw(params, initOverrides); return await response.value(); } @@ -3143,6 +4663,22 @@ 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 */ @@ -3151,6 +4687,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 */ @@ -3261,6 +4833,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 */ @@ -3269,6 +4899,125 @@ export const GetUserBalanceHistoryGranularityEnum = { Daily: 'daily' } as const; export type GetUserBalanceHistoryGranularityEnum = typeof GetUserBalanceHistoryGranularityEnum[keyof typeof GetUserBalanceHistoryGranularityEnum]; +/** + * @export + */ +export const GetUserFavoriteTracksSortMethodEnum = { + 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 GetUserFavoriteTracksSortMethodEnum = typeof GetUserFavoriteTracksSortMethodEnum[keyof typeof GetUserFavoriteTracksSortMethodEnum]; +/** + * @export + */ +export const GetUserFavoriteTracksSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetUserFavoriteTracksSortDirectionEnum = typeof GetUserFavoriteTracksSortDirectionEnum[keyof typeof GetUserFavoriteTracksSortDirectionEnum]; +/** + * @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/AccessGate.ts b/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts index 283722cfa35..5f47f67fd71 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts @@ -13,13 +13,6 @@ * Do not edit the class manually. */ -import { - ExtendedPurchaseGate, - instanceOfExtendedPurchaseGate, - ExtendedPurchaseGateFromJSON, - ExtendedPurchaseGateFromJSONTyped, - ExtendedPurchaseGateToJSON, -} from './ExtendedPurchaseGate'; import { FollowGate, instanceOfFollowGate, @@ -27,6 +20,20 @@ import { FollowGateFromJSONTyped, FollowGateToJSON, } from './FollowGate'; +import { + NftGate, + instanceOfNftGate, + NftGateFromJSON, + NftGateFromJSONTyped, + NftGateToJSON, +} from './NftGate'; +import { + PurchaseGate, + instanceOfPurchaseGate, + PurchaseGateFromJSON, + PurchaseGateFromJSONTyped, + PurchaseGateToJSON, +} from './PurchaseGate'; import { TipGate, instanceOfTipGate, @@ -47,7 +54,7 @@ import { * * @export */ -export type AccessGate = ExtendedPurchaseGate | FollowGate | TipGate | TokenGate; +export type AccessGate = FollowGate | NftGate | PurchaseGate | TipGate | TokenGate; export function AccessGateFromJSON(json: any): AccessGate { return AccessGateFromJSONTyped(json, false); @@ -57,7 +64,7 @@ export function AccessGateFromJSONTyped(json: any, ignoreDiscriminator: boolean) if ((json === undefined) || (json === null)) { return json; } - return { ...ExtendedPurchaseGateFromJSONTyped(json, true), ...FollowGateFromJSONTyped(json, true), ...TipGateFromJSONTyped(json, true), ...TokenGateFromJSONTyped(json, true) }; + return { ...FollowGateFromJSONTyped(json, true), ...NftGateFromJSONTyped(json, true), ...PurchaseGateFromJSONTyped(json, true), ...TipGateFromJSONTyped(json, true), ...TokenGateFromJSONTyped(json, true) }; } export function AccessGateToJSON(value?: AccessGate | null): any { @@ -68,12 +75,15 @@ export function AccessGateToJSON(value?: AccessGate | null): any { return null; } - if (instanceOfExtendedPurchaseGate(value)) { - return ExtendedPurchaseGateToJSON(value as ExtendedPurchaseGate); - } if (instanceOfFollowGate(value)) { return FollowGateToJSON(value as FollowGate); } + if (instanceOfNftGate(value)) { + return NftGateToJSON(value as NftGate); + } + if (instanceOfPurchaseGate(value)) { + return PurchaseGateToJSON(value as PurchaseGate); + } if (instanceOfTipGate(value)) { return TipGateToJSON(value as TipGate); } diff --git a/packages/sdk/src/sdk/api/generated/default/models/Account.ts b/packages/sdk/src/sdk/api/generated/default/models/Account.ts new file mode 100644 index 00000000000..9b2581ddc9c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Account.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 { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface Account + */ +export interface Account { + /** + * + * @type {User} + * @memberof Account + */ + user: User; + /** + * + * @type {Array} + * @memberof Account + */ + playlists: Array; + /** + * + * @type {PlaylistLibrary} + * @memberof Account + */ + playlistLibrary?: PlaylistLibrary; + /** + * + * @type {number} + * @memberof Account + */ + trackSaveCount: number; +} + +/** + * Check if a given object implements the Account interface. + */ +export function instanceOfAccount(value: object): value is Account { + 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 AccountFromJSON(json: any): Account { + return AccountFromJSONTyped(json, false); +} + +export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Account { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'user': UserFromJSON(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 AccountToJSON(value?: Account | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user': UserToJSON(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/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/Activity.ts b/packages/sdk/src/sdk/api/generated/default/models/Activity.ts index c556b43cba1..05ac177d536 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Activity.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Activity.ts @@ -15,7 +15,7 @@ import { exists, mapValues } from '../runtime'; import { - CollectionActivityFromJSONTyped, + CollectionActivityWithoutTracksFromJSONTyped, TrackActivityFromJSONTyped } from './'; @@ -84,8 +84,8 @@ export function ActivityFromJSONTyped(json: any, ignoreDiscriminator: boolean): return json; } if (!ignoreDiscriminator) { - if (json['_class'] === 'collection_activity') { - return CollectionActivityFromJSONTyped(json, true); + if (json['_class'] === 'collection_activity_without_tracks') { + return CollectionActivityWithoutTracksFromJSONTyped(json, true); } if (json['_class'] === 'track_activity') { return TrackActivityFromJSONTyped(json, true); diff --git a/packages/sdk/src/sdk/api/generated/default/models/AlbumsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/AlbumsResponse.ts index 077994ad11c..ae48d2b966c 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/AlbumsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/AlbumsResponse.ts @@ -14,12 +14,18 @@ */ import { exists, mapValues } from '../runtime'; -import type { Playlist } from './Playlist'; +import type { PlaylistWithoutTracks } from './PlaylistWithoutTracks'; import { - PlaylistFromJSON, - PlaylistFromJSONTyped, - PlaylistToJSON, -} from './Playlist'; + PlaylistWithoutTracksFromJSON, + PlaylistWithoutTracksFromJSONTyped, + PlaylistWithoutTracksToJSON, +} from './PlaylistWithoutTracks'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -29,10 +35,52 @@ import { export interface AlbumsResponse { /** * - * @type {Array} + * @type {number} + * @memberof AlbumsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof AlbumsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof AlbumsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof AlbumsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof AlbumsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof AlbumsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof AlbumsResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} * @memberof AlbumsResponse */ - data?: Array; + data?: Array; } /** @@ -40,6 +88,13 @@ export interface AlbumsResponse { */ export function instanceOfAlbumsResponse(value: object): value is AlbumsResponse { 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; } @@ -54,7 +109,14 @@ export function AlbumsResponseFromJSONTyped(json: any, ignoreDiscriminator: bool } return { - 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(PlaylistFromJSON)), + '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(PlaylistWithoutTracksFromJSON)), }; } @@ -67,7 +129,14 @@ export function AlbumsResponseToJSON(value?: AlbumsResponse | null): any { } return { - 'data': value.data === undefined ? undefined : ((value.data as Array).map(PlaylistToJSON)), + '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(PlaylistWithoutTracksToJSON)), }; } 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/CoinArtistFees.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistCoinFees.ts similarity index 59% rename from packages/sdk/src/sdk/api/generated/default/models/CoinArtistFees.ts rename to packages/sdk/src/sdk/api/generated/default/models/ArtistCoinFees.ts index 07f1020dacb..3f45f096cc4 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinArtistFees.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistCoinFees.ts @@ -15,39 +15,39 @@ import { exists, mapValues } from '../runtime'; /** - * Information about the fees earned by the artist on the coin's trading. + * Artist coin fee info (unclaimed/total) * @export - * @interface CoinArtistFees + * @interface ArtistCoinFees */ -export interface CoinArtistFees { +export interface ArtistCoinFees { /** - * Total unclaimed fees from all sources, in $AUDIO. + * Unclaimed fees * @type {number} - * @memberof CoinArtistFees + * @memberof ArtistCoinFees */ unclaimedFees?: number; /** - * Total fees earned from all sources, in $AUDIO. + * Total fees * @type {number} - * @memberof CoinArtistFees + * @memberof ArtistCoinFees */ totalFees?: number; } /** - * Check if a given object implements the CoinArtistFees interface. + * Check if a given object implements the ArtistCoinFees interface. */ -export function instanceOfCoinArtistFees(value: object): value is CoinArtistFees { +export function instanceOfArtistCoinFees(value: object): value is ArtistCoinFees { let isInstance = true; return isInstance; } -export function CoinArtistFeesFromJSON(json: any): CoinArtistFees { - return CoinArtistFeesFromJSONTyped(json, false); +export function ArtistCoinFeesFromJSON(json: any): ArtistCoinFees { + return ArtistCoinFeesFromJSONTyped(json, false); } -export function CoinArtistFeesFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinArtistFees { +export function ArtistCoinFeesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistCoinFees { if ((json === undefined) || (json === null)) { return json; } @@ -58,7 +58,7 @@ export function CoinArtistFeesFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function CoinArtistFeesToJSON(value?: CoinArtistFees | null): any { +export function ArtistCoinFeesToJSON(value?: ArtistCoinFees | null): any { if (value === undefined) { return undefined; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoinArtistLocker.ts b/packages/sdk/src/sdk/api/generated/default/models/ArtistLocker.ts similarity index 57% rename from packages/sdk/src/sdk/api/generated/default/models/CoinArtistLocker.ts rename to packages/sdk/src/sdk/api/generated/default/models/ArtistLocker.ts index 661186561c4..3a6fba57a44 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinArtistLocker.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/ArtistLocker.ts @@ -15,51 +15,51 @@ import { exists, mapValues } from '../runtime'; /** - * Information about the artist locker associated with the coin. + * Artist locker balance and claimable info for the coin * @export - * @interface CoinArtistLocker + * @interface ArtistLocker */ -export interface CoinArtistLocker { +export interface ArtistLocker { /** - * The address of the artist locker. + * Locker contract/pool address * @type {string} - * @memberof CoinArtistLocker + * @memberof ArtistLocker */ address?: string; /** - * The amount currently locked in the artist locker. + * Locked amount * @type {number} - * @memberof CoinArtistLocker + * @memberof ArtistLocker */ locked?: number; /** - * The amount currently unlocked in the artist locker. + * Unlocked amount * @type {number} - * @memberof CoinArtistLocker + * @memberof ArtistLocker */ unlocked?: number; /** - * The amount claimable from the artist locker. Eg. the amount unlocked that hasn't already been claimed. + * Claimable amount * @type {number} - * @memberof CoinArtistLocker + * @memberof ArtistLocker */ claimable?: number; } /** - * Check if a given object implements the CoinArtistLocker interface. + * Check if a given object implements the ArtistLocker interface. */ -export function instanceOfCoinArtistLocker(value: object): value is CoinArtistLocker { +export function instanceOfArtistLocker(value: object): value is ArtistLocker { let isInstance = true; return isInstance; } -export function CoinArtistLockerFromJSON(json: any): CoinArtistLocker { - return CoinArtistLockerFromJSONTyped(json, false); +export function ArtistLockerFromJSON(json: any): ArtistLocker { + return ArtistLockerFromJSONTyped(json, false); } -export function CoinArtistLockerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinArtistLocker { +export function ArtistLockerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtistLocker { if ((json === undefined) || (json === null)) { return json; } @@ -72,7 +72,7 @@ export function CoinArtistLockerFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function CoinArtistLockerToJSON(value?: CoinArtistLocker | null): any { +export function ArtistLockerToJSON(value?: ArtistLocker | null): any { if (value === undefined) { return undefined; } 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/BestSellingResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/BestSellingResponse.ts index 8ccadaea003..5c28cb52774 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/BestSellingResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/BestSellingResponse.ts @@ -20,6 +20,18 @@ import { BestSellingItemFromJSONTyped, BestSellingItemToJSON, } from './BestSellingItem'; +import type { Related } from './Related'; +import { + RelatedFromJSON, + RelatedFromJSONTyped, + RelatedToJSON, +} from './Related'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,12 +39,60 @@ import { * @interface BestSellingResponse */ export interface BestSellingResponse { + /** + * + * @type {number} + * @memberof BestSellingResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof BestSellingResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof BestSellingResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof BestSellingResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof BestSellingResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof BestSellingResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof BestSellingResponse + */ + version: VersionMetadata; /** * * @type {Array} * @memberof BestSellingResponse */ data?: Array; + /** + * + * @type {Related} + * @memberof BestSellingResponse + */ + related?: Related; } /** @@ -40,6 +100,13 @@ export interface BestSellingResponse { */ export function instanceOfBestSellingResponse(value: object): value is BestSellingResponse { 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; } @@ -54,7 +121,15 @@ export function BestSellingResponseFromJSONTyped(json: any, ignoreDiscriminator: } 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(BestSellingItemFromJSON)), + 'related': !exists(json, 'related') ? undefined : RelatedFromJSON(json['related']), }; } @@ -67,7 +142,15 @@ export function BestSellingResponseToJSON(value?: BestSellingResponse | null): a } 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(BestSellingItemToJSON)), + 'related': RelatedToJSON(value.related), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/BulkSubscribersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/BulkSubscribersResponse.ts new file mode 100644 index 00000000000..e841fe4b924 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/BulkSubscribersResponse.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 BulkSubscribersResponse + */ +export interface BulkSubscribersResponse { + /** + * + * @type {number} + * @memberof BulkSubscribersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof BulkSubscribersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof BulkSubscribersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof BulkSubscribersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof BulkSubscribersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof BulkSubscribersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof BulkSubscribersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof BulkSubscribersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the BulkSubscribersResponse interface. + */ +export function instanceOfBulkSubscribersResponse(value: object): value is BulkSubscribersResponse { + 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 BulkSubscribersResponseFromJSON(json: any): BulkSubscribersResponse { + return BulkSubscribersResponseFromJSONTyped(json, false); +} + +export function BulkSubscribersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkSubscribersResponse { + 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 BulkSubscribersResponseToJSON(value?: BulkSubscribersResponse | 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/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/Coin.ts b/packages/sdk/src/sdk/api/generated/default/models/Coin.ts index 03509b08e37..dcd8b18ce47 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Coin.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Coin.ts @@ -14,99 +14,99 @@ */ import { exists, mapValues } from '../runtime'; -import type { CoinArtistFees } from './CoinArtistFees'; +import type { ArtistCoinFees } from './ArtistCoinFees'; import { - CoinArtistFeesFromJSON, - CoinArtistFeesFromJSONTyped, - CoinArtistFeesToJSON, -} from './CoinArtistFees'; -import type { CoinArtistLocker } from './CoinArtistLocker'; + ArtistCoinFeesFromJSON, + ArtistCoinFeesFromJSONTyped, + ArtistCoinFeesToJSON, +} from './ArtistCoinFees'; +import type { ArtistLocker } from './ArtistLocker'; import { - CoinArtistLockerFromJSON, - CoinArtistLockerFromJSONTyped, - CoinArtistLockerToJSON, -} from './CoinArtistLocker'; -import type { CoinDynamicBondingCurve } from './CoinDynamicBondingCurve'; + ArtistLockerFromJSON, + ArtistLockerFromJSONTyped, + ArtistLockerToJSON, +} from './ArtistLocker'; +import type { DynamicBondingCurveInsights } from './DynamicBondingCurveInsights'; import { - CoinDynamicBondingCurveFromJSON, - CoinDynamicBondingCurveFromJSONTyped, - CoinDynamicBondingCurveToJSON, -} from './CoinDynamicBondingCurve'; -import type { CoinExtensions } from './CoinExtensions'; + DynamicBondingCurveInsightsFromJSON, + DynamicBondingCurveInsightsFromJSONTyped, + DynamicBondingCurveInsightsToJSON, +} from './DynamicBondingCurveInsights'; +import type { RewardPool } from './RewardPool'; import { - CoinExtensionsFromJSON, - CoinExtensionsFromJSONTyped, - CoinExtensionsToJSON, -} from './CoinExtensions'; -import type { CoinRewardPool } from './CoinRewardPool'; -import { - CoinRewardPoolFromJSON, - CoinRewardPoolFromJSONTyped, - CoinRewardPoolToJSON, -} from './CoinRewardPool'; + RewardPoolFromJSON, + RewardPoolFromJSONTyped, + RewardPoolToJSON, +} from './RewardPool'; /** - * + * A coin object * @export * @interface Coin */ export interface Coin { /** - * The coin name + * The mint address of the coin * @type {string} * @memberof Coin */ - name: string; + mint: string; /** - * The coin symbol + * The coin symbol/ticker * @type {string} * @memberof Coin */ - ticker?: string; + ticker: string; + /** + * The number of decimals for the coin + * @type {number} + * @memberof Coin + */ + decimals: number; /** - * The coin mint address + * The coin name * @type {string} * @memberof Coin */ - mint: string; + name: string; /** - * The number of decimals for the coin - * @type {number} + * The URI for the coin's logo image + * @type {string} * @memberof Coin */ - decimals: number; + logoUri?: string; /** - * The ID of the user associated with the coin + * The URI for the coin's banner image * @type {string} * @memberof Coin */ - ownerId: string; + bannerImageUrl?: string; /** - * The escrow recipient address for custom-created coins without DBCs + * The description of the coin * @type {string} * @memberof Coin */ - escrowRecipient?: string; + description?: string; /** - * URL to the coin's logo image + * X (Twitter) handle for the coin * @type {string} * @memberof Coin */ - logoUri?: string; + xHandle?: string; /** - * URL to the coin's banner image + * Instagram handle for the coin * @type {string} * @memberof Coin */ - bannerImageUrl?: string; + instagramHandle?: string; /** - * A longform description about the coin + * TikTok handle for the coin * @type {string} * @memberof Coin */ - description?: string; + tiktokHandle?: string; /** - * The official website for the coin + * Website URL for the coin * @type {string} * @memberof Coin */ @@ -140,343 +140,115 @@ export interface Coin { * @type {boolean} * @memberof Coin */ - hasDiscord: boolean; + hasDiscord?: boolean; /** - * The date and time when the coin was added to Audius. - * @type {string} + * The date and time when the coin was created + * @type {Date} * @memberof Coin */ - createdAt: string; + createdAt: Date; /** - * The SPL token mint address - * @type {string} + * The date and time when the coin was last updated + * @type {Date} * @memberof Coin */ - address?: string; + updatedAt?: Date; /** - * The token symbol + * The user ID of the coin owner * @type {string} * @memberof Coin */ - symbol?: string; + ownerId?: string; /** - * Market capitalization in USD - * @type {number} - * @memberof Coin - */ - marketCap: number; - /** - * Fully diluted valuation in USD - * @type {number} + * The escrow recipient address for custom-created coins without DBCs + * @type {string} * @memberof Coin */ - fdv: number; + escrowRecipient?: string; /** * - * @type {CoinExtensions} + * @type {DynamicBondingCurveInsights} * @memberof Coin */ - extensions?: CoinExtensions; + dynamicBondingCurve?: DynamicBondingCurveInsights; /** - * Current liquidity in USD - * @type {number} + * + * @type {ArtistLocker} * @memberof Coin */ - liquidity: number; + artistLocker?: ArtistLocker; /** - * Unix timestamp of the last trade - * @type {number} + * + * @type {ArtistCoinFees} * @memberof Coin */ - lastTradeUnixTime: number; + artistFees?: ArtistCoinFees; /** - * ISO8601 time of the last trade - * @type {string} + * + * @type {RewardPool} * @memberof Coin */ - lastTradeHumanTime: string; + rewardPool?: RewardPool; /** * Current price in USD * @type {number} * @memberof Coin */ - price: number; - /** - * Price 24 hours ago in USD - * @type {number} - * @memberof Coin - */ - history24hPrice: number; - /** - * 24h price change in percent - * @type {number} - * @memberof Coin - */ - priceChange24hPercent: number; - /** - * Unique wallets traded in last 24h - * @type {number} - * @memberof Coin - */ - uniqueWallet24h: number; - /** - * Unique wallets traded in previous 24h - * @type {number} - * @memberof Coin - */ - uniqueWalletHistory24h: number; - /** - * 24h change in unique wallets (percent) - * @type {number} - * @memberof Coin - */ - uniqueWallet24hChangePercent: number; + price?: number; /** - * Total supply of the token + * Market capitalization in USD * @type {number} * @memberof Coin */ - totalSupply: number; + marketCap?: number; /** - * Circulating supply of the token + * Total volume traded in USD (all time) * @type {number} * @memberof Coin */ - circulatingSupply: number; + totalVolumeUSD?: number; /** * Number of holders * @type {number} * @memberof Coin */ - holder: number; - /** - * Number of trades in last 24h - * @type {number} - * @memberof Coin - */ - trade24h: number; - /** - * Number of trades in previous 24h - * @type {number} - * @memberof Coin - */ - tradeHistory24h: number; - /** - * 24h change in trade count (percent) - * @type {number} - * @memberof Coin - */ - trade24hChangePercent: number; - /** - * Number of sell trades in last 24h - * @type {number} - * @memberof Coin - */ - sell24h: number; - /** - * Number of sell trades in previous 24h - * @type {number} - * @memberof Coin - */ - sellHistory24h: number; - /** - * 24h change in sell trades (percent) - * @type {number} - * @memberof Coin - */ - sell24hChangePercent: number; - /** - * Number of buy trades in last 24h - * @type {number} - * @memberof Coin - */ - buy24h: number; - /** - * Number of buy trades in previous 24h - * @type {number} - * @memberof Coin - */ - buyHistory24h: number; - /** - * 24h change in buy trades (percent) - * @type {number} - * @memberof Coin - */ - buy24hChangePercent: number; - /** - * 24h trading volume (token units) - * @type {number} - * @memberof Coin - */ - v24h: number; - /** - * 24h trading volume in USD - * @type {number} - * @memberof Coin - */ - v24hUSD: number; + holder?: number; /** - * Previous 24h trading volume (token units) - * @type {number} - * @memberof Coin - */ - vHistory24h: number; - /** - * Previous 24h trading volume in USD - * @type {number} - * @memberof Coin - */ - vHistory24hUSD?: number; - /** - * 24h change in volume (percent) - * @type {number} - * @memberof Coin - */ - v24hChangePercent?: number; - /** - * 24h buy volume (token units) - * @type {number} - * @memberof Coin - */ - vBuy24h?: number; - /** - * 24h buy volume in USD - * @type {number} - * @memberof Coin - */ - vBuy24hUSD?: number; - /** - * Previous 24h buy volume (token units) - * @type {number} - * @memberof Coin - */ - vBuyHistory24h?: number; - /** - * Previous 24h buy volume in USD - * @type {number} - * @memberof Coin - */ - vBuyHistory24hUSD?: number; - /** - * 24h change in buy volume (percent) - * @type {number} - * @memberof Coin - */ - vBuy24hChangePercent?: number; - /** - * 24h sell volume (token units) - * @type {number} - * @memberof Coin - */ - vSell24h?: number; - /** - * 24h sell volume in USD - * @type {number} - * @memberof Coin - */ - vSell24hUSD?: number; - /** - * Previous 24h sell volume (token units) - * @type {number} - * @memberof Coin - */ - vSellHistory24h?: number; - /** - * Previous 24h sell volume in USD - * @type {number} - * @memberof Coin - */ - vSellHistory24hUSD?: number; - /** - * 24h change in sell volume (percent) - * @type {number} - * @memberof Coin - */ - vSell24hChangePercent?: number; - /** - * Number of markets the token is traded on - * @type {number} - * @memberof Coin - */ - numberMarkets?: number; - /** - * Total volume of coin traded (all time) - * @type {number} - * @memberof Coin - */ - totalVolume: number; - /** - * Total volume of coin traded in USD (all time) - * @type {number} - * @memberof Coin - */ - totalVolumeUSD: number; - /** - * Total volume bought (all time) - * @type {number} - * @memberof Coin - */ - volumeBuy: number; - /** - * Total volume bought in USD (all time) + * Total supply of the token * @type {number} * @memberof Coin */ - volumeBuyUSD: number; + totalSupply?: number; /** - * Total volume sold (all time) + * Current liquidity in USD * @type {number} * @memberof Coin */ - volumeSell: number; + liquidity?: number; /** - * Total volume sold in USD (all time) + * Circulating supply of the token * @type {number} * @memberof Coin */ - volumeSellUSD: number; + circulatingSupply?: number; /** - * Total number of trades (all time) + * 24h price change in percent * @type {number} * @memberof Coin */ - totalTrade: number; + priceChange24hPercent?: number; /** - * Total number of buys (all time) + * Display price (client-computed, e.g. for display formatting) * @type {number} * @memberof Coin */ - buy: number; + displayPrice?: number; /** - * Total number of sells (all time) + * Display market cap (client-computed) * @type {number} * @memberof Coin */ - sell: number; - /** - * - * @type {CoinDynamicBondingCurve} - * @memberof Coin - */ - dynamicBondingCurve: CoinDynamicBondingCurve; - /** - * - * @type {CoinArtistFees} - * @memberof Coin - */ - artistFees?: CoinArtistFees; - /** - * - * @type {CoinArtistLocker} - * @memberof Coin - */ - artistLocker?: CoinArtistLocker; - /** - * - * @type {CoinRewardPool} - * @memberof Coin - */ - rewardPool?: CoinRewardPool; + displayMarketCap?: number; } /** @@ -484,48 +256,11 @@ export interface Coin { */ export function instanceOfCoin(value: object): value is Coin { let isInstance = true; - isInstance = isInstance && "name" in value && value["name"] !== undefined; isInstance = isInstance && "mint" in value && value["mint"] !== undefined; + isInstance = isInstance && "ticker" in value && value["ticker"] !== undefined; isInstance = isInstance && "decimals" in value && value["decimals"] !== undefined; - isInstance = isInstance && "ownerId" in value && value["ownerId"] !== undefined; - isInstance = isInstance && "hasDiscord" in value && value["hasDiscord"] !== undefined; + isInstance = isInstance && "name" in value && value["name"] !== undefined; isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; - isInstance = isInstance && "marketCap" in value && value["marketCap"] !== undefined; - isInstance = isInstance && "fdv" in value && value["fdv"] !== undefined; - isInstance = isInstance && "liquidity" in value && value["liquidity"] !== undefined; - isInstance = isInstance && "lastTradeUnixTime" in value && value["lastTradeUnixTime"] !== undefined; - isInstance = isInstance && "lastTradeHumanTime" in value && value["lastTradeHumanTime"] !== undefined; - isInstance = isInstance && "price" in value && value["price"] !== undefined; - isInstance = isInstance && "history24hPrice" in value && value["history24hPrice"] !== undefined; - isInstance = isInstance && "priceChange24hPercent" in value && value["priceChange24hPercent"] !== undefined; - isInstance = isInstance && "uniqueWallet24h" in value && value["uniqueWallet24h"] !== undefined; - isInstance = isInstance && "uniqueWalletHistory24h" in value && value["uniqueWalletHistory24h"] !== undefined; - isInstance = isInstance && "uniqueWallet24hChangePercent" in value && value["uniqueWallet24hChangePercent"] !== undefined; - isInstance = isInstance && "totalSupply" in value && value["totalSupply"] !== undefined; - isInstance = isInstance && "circulatingSupply" in value && value["circulatingSupply"] !== undefined; - isInstance = isInstance && "holder" in value && value["holder"] !== undefined; - isInstance = isInstance && "trade24h" in value && value["trade24h"] !== undefined; - isInstance = isInstance && "tradeHistory24h" in value && value["tradeHistory24h"] !== undefined; - isInstance = isInstance && "trade24hChangePercent" in value && value["trade24hChangePercent"] !== undefined; - isInstance = isInstance && "sell24h" in value && value["sell24h"] !== undefined; - isInstance = isInstance && "sellHistory24h" in value && value["sellHistory24h"] !== undefined; - isInstance = isInstance && "sell24hChangePercent" in value && value["sell24hChangePercent"] !== undefined; - isInstance = isInstance && "buy24h" in value && value["buy24h"] !== undefined; - isInstance = isInstance && "buyHistory24h" in value && value["buyHistory24h"] !== undefined; - isInstance = isInstance && "buy24hChangePercent" in value && value["buy24hChangePercent"] !== undefined; - isInstance = isInstance && "v24h" in value && value["v24h"] !== undefined; - isInstance = isInstance && "v24hUSD" in value && value["v24hUSD"] !== undefined; - isInstance = isInstance && "vHistory24h" in value && value["vHistory24h"] !== undefined; - isInstance = isInstance && "totalVolume" in value && value["totalVolume"] !== undefined; - isInstance = isInstance && "totalVolumeUSD" in value && value["totalVolumeUSD"] !== undefined; - isInstance = isInstance && "volumeBuy" in value && value["volumeBuy"] !== undefined; - isInstance = isInstance && "volumeBuyUSD" in value && value["volumeBuyUSD"] !== undefined; - isInstance = isInstance && "volumeSell" in value && value["volumeSell"] !== undefined; - isInstance = isInstance && "volumeSellUSD" in value && value["volumeSellUSD"] !== undefined; - isInstance = isInstance && "totalTrade" in value && value["totalTrade"] !== undefined; - isInstance = isInstance && "buy" in value && value["buy"] !== undefined; - isInstance = isInstance && "sell" in value && value["sell"] !== undefined; - isInstance = isInstance && "dynamicBondingCurve" in value && value["dynamicBondingCurve"] !== undefined; return isInstance; } @@ -540,77 +275,40 @@ export function CoinFromJSONTyped(json: any, ignoreDiscriminator: boolean): Coin } return { - 'name': json['name'], - 'ticker': !exists(json, 'ticker') ? undefined : json['ticker'], 'mint': json['mint'], + 'ticker': json['ticker'], 'decimals': json['decimals'], - 'ownerId': json['owner_id'], - 'escrowRecipient': !exists(json, 'escrow_recipient') ? undefined : json['escrow_recipient'], + 'name': json['name'], 'logoUri': !exists(json, 'logo_uri') ? undefined : json['logo_uri'], 'bannerImageUrl': !exists(json, 'banner_image_url') ? undefined : json['banner_image_url'], 'description': !exists(json, 'description') ? undefined : json['description'], + 'xHandle': !exists(json, 'x_handle') ? undefined : json['x_handle'], + 'instagramHandle': !exists(json, 'instagram_handle') ? undefined : json['instagram_handle'], + 'tiktokHandle': !exists(json, 'tiktok_handle') ? undefined : json['tiktok_handle'], 'website': !exists(json, 'website') ? undefined : json['website'], 'link1': !exists(json, 'link_1') ? undefined : json['link_1'], 'link2': !exists(json, 'link_2') ? undefined : json['link_2'], 'link3': !exists(json, 'link_3') ? undefined : json['link_3'], 'link4': !exists(json, 'link_4') ? undefined : json['link_4'], - 'hasDiscord': json['has_discord'], - 'createdAt': json['created_at'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'symbol': !exists(json, 'symbol') ? undefined : json['symbol'], - 'marketCap': json['marketCap'], - 'fdv': json['fdv'], - 'extensions': !exists(json, 'extensions') ? undefined : CoinExtensionsFromJSON(json['extensions']), - 'liquidity': json['liquidity'], - 'lastTradeUnixTime': json['lastTradeUnixTime'], - 'lastTradeHumanTime': json['lastTradeHumanTime'], - 'price': json['price'], - 'history24hPrice': json['history24hPrice'], - 'priceChange24hPercent': json['priceChange24hPercent'], - 'uniqueWallet24h': json['uniqueWallet24h'], - 'uniqueWalletHistory24h': json['uniqueWalletHistory24h'], - 'uniqueWallet24hChangePercent': json['uniqueWallet24hChangePercent'], - 'totalSupply': json['totalSupply'], - 'circulatingSupply': json['circulatingSupply'], - 'holder': json['holder'], - 'trade24h': json['trade24h'], - 'tradeHistory24h': json['tradeHistory24h'], - 'trade24hChangePercent': json['trade24hChangePercent'], - 'sell24h': json['sell24h'], - 'sellHistory24h': json['sellHistory24h'], - 'sell24hChangePercent': json['sell24hChangePercent'], - 'buy24h': json['buy24h'], - 'buyHistory24h': json['buyHistory24h'], - 'buy24hChangePercent': json['buy24hChangePercent'], - 'v24h': json['v24h'], - 'v24hUSD': json['v24hUSD'], - 'vHistory24h': json['vHistory24h'], - 'vHistory24hUSD': !exists(json, 'vHistory24hUSD') ? undefined : json['vHistory24hUSD'], - 'v24hChangePercent': !exists(json, 'v24hChangePercent') ? undefined : json['v24hChangePercent'], - 'vBuy24h': !exists(json, 'vBuy24h') ? undefined : json['vBuy24h'], - 'vBuy24hUSD': !exists(json, 'vBuy24hUSD') ? undefined : json['vBuy24hUSD'], - 'vBuyHistory24h': !exists(json, 'vBuyHistory24h') ? undefined : json['vBuyHistory24h'], - 'vBuyHistory24hUSD': !exists(json, 'vBuyHistory24hUSD') ? undefined : json['vBuyHistory24hUSD'], - 'vBuy24hChangePercent': !exists(json, 'vBuy24hChangePercent') ? undefined : json['vBuy24hChangePercent'], - 'vSell24h': !exists(json, 'vSell24h') ? undefined : json['vSell24h'], - 'vSell24hUSD': !exists(json, 'vSell24hUSD') ? undefined : json['vSell24hUSD'], - 'vSellHistory24h': !exists(json, 'vSellHistory24h') ? undefined : json['vSellHistory24h'], - 'vSellHistory24hUSD': !exists(json, 'vSellHistory24hUSD') ? undefined : json['vSellHistory24hUSD'], - 'vSell24hChangePercent': !exists(json, 'vSell24hChangePercent') ? undefined : json['vSell24hChangePercent'], - 'numberMarkets': !exists(json, 'numberMarkets') ? undefined : json['numberMarkets'], - 'totalVolume': json['totalVolume'], - 'totalVolumeUSD': json['totalVolumeUSD'], - 'volumeBuy': json['volumeBuy'], - 'volumeBuyUSD': json['volumeBuyUSD'], - 'volumeSell': json['volumeSell'], - 'volumeSellUSD': json['volumeSellUSD'], - 'totalTrade': json['totalTrade'], - 'buy': json['buy'], - 'sell': json['sell'], - 'dynamicBondingCurve': CoinDynamicBondingCurveFromJSON(json['dynamicBondingCurve']), - 'artistFees': !exists(json, 'artist_fees') ? undefined : CoinArtistFeesFromJSON(json['artist_fees']), - 'artistLocker': !exists(json, 'artist_locker') ? undefined : CoinArtistLockerFromJSON(json['artist_locker']), - 'rewardPool': !exists(json, 'reward_pool') ? undefined : CoinRewardPoolFromJSON(json['reward_pool']), + 'hasDiscord': !exists(json, 'has_discord') ? undefined : json['has_discord'], + 'createdAt': (new Date(json['created_at'])), + 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), + 'ownerId': !exists(json, 'owner_id') ? undefined : json['owner_id'], + 'escrowRecipient': !exists(json, 'escrow_recipient') ? undefined : json['escrow_recipient'], + 'dynamicBondingCurve': !exists(json, 'dynamicBondingCurve') ? undefined : DynamicBondingCurveInsightsFromJSON(json['dynamicBondingCurve']), + 'artistLocker': !exists(json, 'artist_locker') ? undefined : ArtistLockerFromJSON(json['artist_locker']), + 'artistFees': !exists(json, 'artist_fees') ? undefined : ArtistCoinFeesFromJSON(json['artist_fees']), + 'rewardPool': !exists(json, 'reward_pool') ? undefined : RewardPoolFromJSON(json['reward_pool']), + 'price': !exists(json, 'price') ? undefined : json['price'], + 'marketCap': !exists(json, 'marketCap') ? undefined : json['marketCap'], + 'totalVolumeUSD': !exists(json, 'totalVolumeUSD') ? undefined : json['totalVolumeUSD'], + 'holder': !exists(json, 'holder') ? undefined : json['holder'], + 'totalSupply': !exists(json, 'totalSupply') ? undefined : json['totalSupply'], + 'liquidity': !exists(json, 'liquidity') ? undefined : json['liquidity'], + 'circulatingSupply': !exists(json, 'circulatingSupply') ? undefined : json['circulatingSupply'], + 'priceChange24hPercent': !exists(json, 'priceChange24hPercent') ? undefined : json['priceChange24hPercent'], + 'displayPrice': !exists(json, 'displayPrice') ? undefined : json['displayPrice'], + 'displayMarketCap': !exists(json, 'displayMarketCap') ? undefined : json['displayMarketCap'], }; } @@ -623,77 +321,40 @@ export function CoinToJSON(value?: Coin | null): any { } return { - 'name': value.name, - 'ticker': value.ticker, 'mint': value.mint, + 'ticker': value.ticker, 'decimals': value.decimals, - 'owner_id': value.ownerId, - 'escrow_recipient': value.escrowRecipient, + 'name': value.name, 'logo_uri': value.logoUri, 'banner_image_url': value.bannerImageUrl, 'description': value.description, + 'x_handle': value.xHandle, + 'instagram_handle': value.instagramHandle, + 'tiktok_handle': value.tiktokHandle, 'website': value.website, 'link_1': value.link1, 'link_2': value.link2, 'link_3': value.link3, 'link_4': value.link4, 'has_discord': value.hasDiscord, - 'created_at': value.createdAt, - 'address': value.address, - 'symbol': value.symbol, - 'marketCap': value.marketCap, - 'fdv': value.fdv, - 'extensions': CoinExtensionsToJSON(value.extensions), - 'liquidity': value.liquidity, - 'lastTradeUnixTime': value.lastTradeUnixTime, - 'lastTradeHumanTime': value.lastTradeHumanTime, + 'created_at': (value.createdAt.toISOString()), + 'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()), + 'owner_id': value.ownerId, + 'escrow_recipient': value.escrowRecipient, + 'dynamicBondingCurve': DynamicBondingCurveInsightsToJSON(value.dynamicBondingCurve), + 'artist_locker': ArtistLockerToJSON(value.artistLocker), + 'artist_fees': ArtistCoinFeesToJSON(value.artistFees), + 'reward_pool': RewardPoolToJSON(value.rewardPool), 'price': value.price, - 'history24hPrice': value.history24hPrice, - 'priceChange24hPercent': value.priceChange24hPercent, - 'uniqueWallet24h': value.uniqueWallet24h, - 'uniqueWalletHistory24h': value.uniqueWalletHistory24h, - 'uniqueWallet24hChangePercent': value.uniqueWallet24hChangePercent, + 'marketCap': value.marketCap, + 'totalVolumeUSD': value.totalVolumeUSD, + 'holder': value.holder, 'totalSupply': value.totalSupply, + 'liquidity': value.liquidity, 'circulatingSupply': value.circulatingSupply, - 'holder': value.holder, - 'trade24h': value.trade24h, - 'tradeHistory24h': value.tradeHistory24h, - 'trade24hChangePercent': value.trade24hChangePercent, - 'sell24h': value.sell24h, - 'sellHistory24h': value.sellHistory24h, - 'sell24hChangePercent': value.sell24hChangePercent, - 'buy24h': value.buy24h, - 'buyHistory24h': value.buyHistory24h, - 'buy24hChangePercent': value.buy24hChangePercent, - 'v24h': value.v24h, - 'v24hUSD': value.v24hUSD, - 'vHistory24h': value.vHistory24h, - 'vHistory24hUSD': value.vHistory24hUSD, - 'v24hChangePercent': value.v24hChangePercent, - 'vBuy24h': value.vBuy24h, - 'vBuy24hUSD': value.vBuy24hUSD, - 'vBuyHistory24h': value.vBuyHistory24h, - 'vBuyHistory24hUSD': value.vBuyHistory24hUSD, - 'vBuy24hChangePercent': value.vBuy24hChangePercent, - 'vSell24h': value.vSell24h, - 'vSell24hUSD': value.vSell24hUSD, - 'vSellHistory24h': value.vSellHistory24h, - 'vSellHistory24hUSD': value.vSellHistory24hUSD, - 'vSell24hChangePercent': value.vSell24hChangePercent, - 'numberMarkets': value.numberMarkets, - 'totalVolume': value.totalVolume, - 'totalVolumeUSD': value.totalVolumeUSD, - 'volumeBuy': value.volumeBuy, - 'volumeBuyUSD': value.volumeBuyUSD, - 'volumeSell': value.volumeSell, - 'volumeSellUSD': value.volumeSellUSD, - 'totalTrade': value.totalTrade, - 'buy': value.buy, - 'sell': value.sell, - 'dynamicBondingCurve': CoinDynamicBondingCurveToJSON(value.dynamicBondingCurve), - 'artist_fees': CoinArtistFeesToJSON(value.artistFees), - 'artist_locker': CoinArtistLockerToJSON(value.artistLocker), - 'reward_pool': CoinRewardPoolToJSON(value.rewardPool), + 'priceChange24hPercent': value.priceChange24hPercent, + 'displayPrice': value.displayPrice, + 'displayMarketCap': value.displayMarketCap, }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoinInsights.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinInsights.ts index f22f5862b0c..51edfbbd9db 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinInsights.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinInsights.ts @@ -14,18 +14,18 @@ */ import { exists, mapValues } from '../runtime'; -import type { CoinDynamicBondingCurve } from './CoinDynamicBondingCurve'; +import type { CoinInsightsDynamicBondingCurve } from './CoinInsightsDynamicBondingCurve'; import { - CoinDynamicBondingCurveFromJSON, - CoinDynamicBondingCurveFromJSONTyped, - CoinDynamicBondingCurveToJSON, -} from './CoinDynamicBondingCurve'; -import type { CoinExtensions } from './CoinExtensions'; + CoinInsightsDynamicBondingCurveFromJSON, + CoinInsightsDynamicBondingCurveFromJSONTyped, + CoinInsightsDynamicBondingCurveToJSON, +} from './CoinInsightsDynamicBondingCurve'; +import type { CoinInsightsExtensions } from './CoinInsightsExtensions'; import { - CoinExtensionsFromJSON, - CoinExtensionsFromJSONTyped, - CoinExtensionsToJSON, -} from './CoinExtensions'; + CoinInsightsExtensionsFromJSON, + CoinInsightsExtensionsFromJSONTyped, + CoinInsightsExtensionsToJSON, +} from './CoinInsightsExtensions'; /** * Additional token information from Birdeye's defi token overview API. @@ -73,10 +73,10 @@ export interface CoinInsights { fdv: number; /** * - * @type {CoinExtensions} + * @type {CoinInsightsExtensions} * @memberof CoinInsights */ - extensions?: CoinExtensions; + extensions?: CoinInsightsExtensions; /** * Current liquidity in USD * @type {number} @@ -355,10 +355,10 @@ export interface CoinInsights { sell: number; /** * - * @type {CoinDynamicBondingCurve} + * @type {CoinInsightsDynamicBondingCurve} * @memberof CoinInsights */ - dynamicBondingCurve: CoinDynamicBondingCurve; + dynamicBondingCurve: CoinInsightsDynamicBondingCurve; } /** @@ -422,7 +422,7 @@ export function CoinInsightsFromJSONTyped(json: any, ignoreDiscriminator: boolea 'name': !exists(json, 'name') ? undefined : json['name'], 'marketCap': json['marketCap'], 'fdv': json['fdv'], - 'extensions': !exists(json, 'extensions') ? undefined : CoinExtensionsFromJSON(json['extensions']), + 'extensions': !exists(json, 'extensions') ? undefined : CoinInsightsExtensionsFromJSON(json['extensions']), 'liquidity': json['liquidity'], 'lastTradeUnixTime': json['lastTradeUnixTime'], 'lastTradeHumanTime': json['lastTradeHumanTime'], @@ -469,7 +469,7 @@ export function CoinInsightsFromJSONTyped(json: any, ignoreDiscriminator: boolea 'totalTrade': json['totalTrade'], 'buy': json['buy'], 'sell': json['sell'], - 'dynamicBondingCurve': CoinDynamicBondingCurveFromJSON(json['dynamicBondingCurve']), + 'dynamicBondingCurve': CoinInsightsDynamicBondingCurveFromJSON(json['dynamicBondingCurve']), }; } @@ -488,7 +488,7 @@ export function CoinInsightsToJSON(value?: CoinInsights | null): any { 'name': value.name, 'marketCap': value.marketCap, 'fdv': value.fdv, - 'extensions': CoinExtensionsToJSON(value.extensions), + 'extensions': CoinInsightsExtensionsToJSON(value.extensions), 'liquidity': value.liquidity, 'lastTradeUnixTime': value.lastTradeUnixTime, 'lastTradeHumanTime': value.lastTradeHumanTime, @@ -535,7 +535,7 @@ export function CoinInsightsToJSON(value?: CoinInsights | null): any { 'totalTrade': value.totalTrade, 'buy': value.buy, 'sell': value.sell, - 'dynamicBondingCurve': CoinDynamicBondingCurveToJSON(value.dynamicBondingCurve), + 'dynamicBondingCurve': CoinInsightsDynamicBondingCurveToJSON(value.dynamicBondingCurve), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoinDynamicBondingCurve.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinInsightsDynamicBondingCurve.ts similarity index 73% rename from packages/sdk/src/sdk/api/generated/default/models/CoinDynamicBondingCurve.ts rename to packages/sdk/src/sdk/api/generated/default/models/CoinInsightsDynamicBondingCurve.ts index 956499c3aca..cf95e34298d 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinDynamicBondingCurve.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinInsightsDynamicBondingCurve.ts @@ -17,63 +17,63 @@ import { exists, mapValues } from '../runtime'; /** * Information about the dynamic bonding curve if one exists for the Coin * @export - * @interface CoinDynamicBondingCurve + * @interface CoinInsightsDynamicBondingCurve */ -export interface CoinDynamicBondingCurve { +export interface CoinInsightsDynamicBondingCurve { /** * Address of the bonding curve pool * @type {string} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ address: string; /** * Current price in the pool's quote token (e.g., AUDIO) * @type {number} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ price: number; /** * Current price in USD * @type {number} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ priceUSD: number; /** * Progress along the bonding curve (0.0 - 1.0) * @type {number} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ curveProgress: number; /** * Whether the bonding curve has been migrated * @type {boolean} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ isMigrated?: boolean; /** * Creator quote fee for the bonding curve * @type {number} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ creatorQuoteFee: number; /** * Total trading quote fee accumulated * @type {number} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ totalTradingQuoteFee: number; /** * Address of the pool creator's wallet * @type {string} - * @memberof CoinDynamicBondingCurve + * @memberof CoinInsightsDynamicBondingCurve */ creatorWalletAddress: string; } /** - * Check if a given object implements the CoinDynamicBondingCurve interface. + * Check if a given object implements the CoinInsightsDynamicBondingCurve interface. */ -export function instanceOfCoinDynamicBondingCurve(value: object): value is CoinDynamicBondingCurve { +export function instanceOfCoinInsightsDynamicBondingCurve(value: object): value is CoinInsightsDynamicBondingCurve { let isInstance = true; isInstance = isInstance && "address" in value && value["address"] !== undefined; isInstance = isInstance && "price" in value && value["price"] !== undefined; @@ -86,11 +86,11 @@ export function instanceOfCoinDynamicBondingCurve(value: object): value is CoinD return isInstance; } -export function CoinDynamicBondingCurveFromJSON(json: any): CoinDynamicBondingCurve { - return CoinDynamicBondingCurveFromJSONTyped(json, false); +export function CoinInsightsDynamicBondingCurveFromJSON(json: any): CoinInsightsDynamicBondingCurve { + return CoinInsightsDynamicBondingCurveFromJSONTyped(json, false); } -export function CoinDynamicBondingCurveFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinDynamicBondingCurve { +export function CoinInsightsDynamicBondingCurveFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinInsightsDynamicBondingCurve { if ((json === undefined) || (json === null)) { return json; } @@ -107,7 +107,7 @@ export function CoinDynamicBondingCurveFromJSONTyped(json: any, ignoreDiscrimina }; } -export function CoinDynamicBondingCurveToJSON(value?: CoinDynamicBondingCurve | null): any { +export function CoinInsightsDynamicBondingCurveToJSON(value?: CoinInsightsDynamicBondingCurve | null): any { if (value === undefined) { return undefined; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoinExtensions.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinInsightsExtensions.ts similarity index 68% rename from packages/sdk/src/sdk/api/generated/default/models/CoinExtensions.ts rename to packages/sdk/src/sdk/api/generated/default/models/CoinInsightsExtensions.ts index 17e7a6f4a0b..7353dacfc32 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinExtensions.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinInsightsExtensions.ts @@ -17,55 +17,55 @@ import { exists, mapValues } from '../runtime'; /** * Token metadata and links * @export - * @interface CoinExtensions + * @interface CoinInsightsExtensions */ -export interface CoinExtensions { +export interface CoinInsightsExtensions { /** * CoinGecko ID * @type {string} - * @memberof CoinExtensions + * @memberof CoinInsightsExtensions */ coingeckoId?: string; /** * Token description * @type {string} - * @memberof CoinExtensions + * @memberof CoinInsightsExtensions */ description?: string; /** * Twitter URL * @type {string} - * @memberof CoinExtensions + * @memberof CoinInsightsExtensions */ twitter?: string; /** * Website URL * @type {string} - * @memberof CoinExtensions + * @memberof CoinInsightsExtensions */ website?: string; /** * Discord invite URL * @type {string} - * @memberof CoinExtensions + * @memberof CoinInsightsExtensions */ discord?: string; } /** - * Check if a given object implements the CoinExtensions interface. + * Check if a given object implements the CoinInsightsExtensions interface. */ -export function instanceOfCoinExtensions(value: object): value is CoinExtensions { +export function instanceOfCoinInsightsExtensions(value: object): value is CoinInsightsExtensions { let isInstance = true; return isInstance; } -export function CoinExtensionsFromJSON(json: any): CoinExtensions { - return CoinExtensionsFromJSONTyped(json, false); +export function CoinInsightsExtensionsFromJSON(json: any): CoinInsightsExtensions { + return CoinInsightsExtensionsFromJSONTyped(json, false); } -export function CoinExtensionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinExtensions { +export function CoinInsightsExtensionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinInsightsExtensions { if ((json === undefined) || (json === null)) { return json; } @@ -79,7 +79,7 @@ export function CoinExtensionsFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function CoinExtensionsToJSON(value?: CoinExtensions | null): any { +export function CoinInsightsExtensionsToJSON(value?: CoinInsightsExtensions | null): any { if (value === undefined) { return undefined; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/CollectionActivity.ts b/packages/sdk/src/sdk/api/generated/default/models/CollectionActivity.ts deleted file mode 100644 index 4bf238b6637..00000000000 --- a/packages/sdk/src/sdk/api/generated/default/models/CollectionActivity.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* 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 { Activity } from './Activity'; -import { - ActivityFromJSON, - ActivityFromJSONTyped, - ActivityToJSON, -} from './Activity'; -import type { Playlist } from './Playlist'; -import { - PlaylistFromJSON, - PlaylistFromJSONTyped, - PlaylistToJSON, -} from './Playlist'; - -/** - * - * @export - * @interface CollectionActivity - */ -export interface CollectionActivity extends Activity { - /** - * - * @type {string} - * @memberof CollectionActivity - */ - timestamp?: string; - /** - * - * @type {string} - * @memberof CollectionActivity - */ - itemType: CollectionActivityItemTypeEnum; - /** - * - * @type {Playlist} - * @memberof CollectionActivity - */ - item: Playlist; -} - - -/** - * @export - */ -export const CollectionActivityItemTypeEnum = { - Playlist: 'playlist' -} as const; -export type CollectionActivityItemTypeEnum = typeof CollectionActivityItemTypeEnum[keyof typeof CollectionActivityItemTypeEnum]; - - -/** - * Check if a given object implements the CollectionActivity interface. - */ -export function instanceOfCollectionActivity(value: object): value is CollectionActivity { - let isInstance = true; - isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; - isInstance = isInstance && "item" in value && value["item"] !== undefined; - - return isInstance; -} - -export function CollectionActivityFromJSON(json: any): CollectionActivity { - return CollectionActivityFromJSONTyped(json, false); -} - -export function CollectionActivityFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionActivity { - if ((json === undefined) || (json === null)) { - return json; - } - return { - ...ActivityFromJSONTyped(json, ignoreDiscriminator), - 'timestamp': !exists(json, 'timestamp') ? undefined : json['timestamp'], - 'itemType': json['item_type'], - 'item': PlaylistFromJSON(json['item']), - }; -} - -export function CollectionActivityToJSON(value?: CollectionActivity | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - ...ActivityToJSON(value), - 'timestamp': value.timestamp, - 'item_type': value.itemType, - 'item': PlaylistToJSON(value.item), - }; -} - diff --git a/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityWithoutTracks.ts b/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityWithoutTracks.ts new file mode 100644 index 00000000000..bd94ea71773 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityWithoutTracks.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 { Activity } from './Activity'; +import { + ActivityFromJSON, + ActivityFromJSONTyped, + ActivityToJSON, +} from './Activity'; +import type { PlaylistWithoutTracks } from './PlaylistWithoutTracks'; +import { + PlaylistWithoutTracksFromJSON, + PlaylistWithoutTracksFromJSONTyped, + PlaylistWithoutTracksToJSON, +} from './PlaylistWithoutTracks'; + +/** + * + * @export + * @interface CollectionActivityWithoutTracks + */ +export interface CollectionActivityWithoutTracks extends Activity { + /** + * + * @type {string} + * @memberof CollectionActivityWithoutTracks + */ + itemType: CollectionActivityWithoutTracksItemTypeEnum; + /** + * + * @type {PlaylistWithoutTracks} + * @memberof CollectionActivityWithoutTracks + */ + item: PlaylistWithoutTracks; +} + + +/** + * @export + */ +export const CollectionActivityWithoutTracksItemTypeEnum = { + Playlist: 'playlist' +} as const; +export type CollectionActivityWithoutTracksItemTypeEnum = typeof CollectionActivityWithoutTracksItemTypeEnum[keyof typeof CollectionActivityWithoutTracksItemTypeEnum]; + + +/** + * Check if a given object implements the CollectionActivityWithoutTracks interface. + */ +export function instanceOfCollectionActivityWithoutTracks(value: object): value is CollectionActivityWithoutTracks { + let isInstance = true; + isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + + return isInstance; +} + +export function CollectionActivityWithoutTracksFromJSON(json: any): CollectionActivityWithoutTracks { + return CollectionActivityWithoutTracksFromJSONTyped(json, false); +} + +export function CollectionActivityWithoutTracksFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionActivityWithoutTracks { + if ((json === undefined) || (json === null)) { + return json; + } + return { + ...ActivityFromJSONTyped(json, ignoreDiscriminator), + 'itemType': json['item_type'], + 'item': PlaylistWithoutTracksFromJSON(json['item']), + }; +} + +export function CollectionActivityWithoutTracksToJSON(value?: CollectionActivityWithoutTracks | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + ...ActivityToJSON(value), + 'item_type': value.itemType, + 'item': PlaylistWithoutTracksToJSON(value.item), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponse.ts new file mode 100644 index 00000000000..61f1f02b089 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponse.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 { CollectionActivityWithoutTracks } from './CollectionActivityWithoutTracks'; +import { + CollectionActivityWithoutTracksFromJSON, + CollectionActivityWithoutTracksFromJSONTyped, + CollectionActivityWithoutTracksToJSON, +} from './CollectionActivityWithoutTracks'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface CollectionLibraryResponse + */ +export interface CollectionLibraryResponse { + /** + * + * @type {number} + * @memberof CollectionLibraryResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof CollectionLibraryResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof CollectionLibraryResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof CollectionLibraryResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof CollectionLibraryResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the CollectionLibraryResponse interface. + */ +export function instanceOfCollectionLibraryResponse(value: object): value is CollectionLibraryResponse { + 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 CollectionLibraryResponseFromJSON(json: any): CollectionLibraryResponse { + return CollectionLibraryResponseFromJSONTyped(json, false); +} + +export function CollectionLibraryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionLibraryResponse { + 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(CollectionActivityWithoutTracksFromJSON)), + }; +} + +export function CollectionLibraryResponseToJSON(value?: CollectionLibraryResponse | 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(CollectionActivityWithoutTracksToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/CommentEntityType.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentEntityType.ts index 02a05fabdf1..de4afdece48 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CommentEntityType.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentEntityType.ts @@ -15,7 +15,7 @@ /** - * + * Type of entity that can be commented on * @export */ export const CommentEntityType = { 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/CommentRepliesResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/CommentRepliesResponse.ts index d9e0bb280d2..bdd28c9a014 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CommentRepliesResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CommentRepliesResponse.ts @@ -14,12 +14,24 @@ */ import { exists, mapValues } from '../runtime'; +import type { Related } from './Related'; +import { + RelatedFromJSON, + RelatedFromJSONTyped, + RelatedToJSON, +} from './Related'; import type { ReplyComment } from './ReplyComment'; import { ReplyCommentFromJSON, ReplyCommentFromJSONTyped, ReplyCommentToJSON, } from './ReplyComment'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,12 +39,60 @@ import { * @interface CommentRepliesResponse */ export interface CommentRepliesResponse { + /** + * + * @type {number} + * @memberof CommentRepliesResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof CommentRepliesResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof CommentRepliesResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof CommentRepliesResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof CommentRepliesResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof CommentRepliesResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof CommentRepliesResponse + */ + version: VersionMetadata; /** * * @type {Array} * @memberof CommentRepliesResponse */ data?: Array; + /** + * + * @type {Related} + * @memberof CommentRepliesResponse + */ + related?: Related; } /** @@ -40,6 +100,13 @@ export interface CommentRepliesResponse { */ export function instanceOfCommentRepliesResponse(value: object): value is CommentRepliesResponse { 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; } @@ -54,7 +121,15 @@ export function CommentRepliesResponseFromJSONTyped(json: any, ignoreDiscriminat } 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(ReplyCommentFromJSON)), + 'related': !exists(json, 'related') ? undefined : RelatedFromJSON(json['related']), }; } @@ -67,7 +142,15 @@ export function CommentRepliesResponseToJSON(value?: CommentRepliesResponse | nu } 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(ReplyCommentToJSON)), + 'related': RelatedToJSON(value.related), }; } 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/CoverPhoto.ts b/packages/sdk/src/sdk/api/generated/default/models/CoverPhoto.ts index e5669e3b10d..dc640173f26 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoverPhoto.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoverPhoto.ts @@ -32,6 +32,12 @@ export interface CoverPhoto { * @memberof CoverPhoto */ _2000x?: string; + /** + * + * @type {Array} + * @memberof CoverPhoto + */ + mirrors?: Array; } /** @@ -55,6 +61,7 @@ export function CoverPhotoFromJSONTyped(json: any, ignoreDiscriminator: boolean) '_640x': !exists(json, '640x') ? undefined : json['640x'], '_2000x': !exists(json, '2000x') ? undefined : json['2000x'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], }; } @@ -69,6 +76,7 @@ export function CoverPhotoToJSON(value?: CoverPhoto | null): any { '640x': value._640x, '2000x': value._2000x, + 'mirrors': value.mirrors, }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateCoinRequestBody.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateCoinRequest.ts similarity index 75% rename from packages/sdk/src/sdk/api/generated/default/models/CreateCoinRequestBody.ts rename to packages/sdk/src/sdk/api/generated/default/models/CreateCoinRequest.ts index 53e70836f09..39817b101dd 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CreateCoinRequestBody.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateCoinRequest.ts @@ -17,81 +17,81 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface CreateCoinRequestBody + * @interface CreateCoinRequest */ -export interface CreateCoinRequestBody { +export interface CreateCoinRequest { /** * The mint address of the coin * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ mint: string; /** * The coin symbol/ticker * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ ticker: string; /** * The number of decimals for the coin (0-18) * @type {number} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ decimals: number; /** * The coin name * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ name: string; /** * The URI for the coin's logo image * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ logoUri?: string; /** * The URI for the coin's banner image * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ bannerImageUrl?: string; /** * The description of the coin * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ description?: string; /** * Generic link URL for the coin * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ link1?: string; /** * Generic link URL for the coin * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ link2?: string; /** * Generic link URL for the coin * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ link3?: string; /** * Generic link URL for the coin * @type {string} - * @memberof CreateCoinRequestBody + * @memberof CreateCoinRequest */ link4?: string; } /** - * Check if a given object implements the CreateCoinRequestBody interface. + * Check if a given object implements the CreateCoinRequest interface. */ -export function instanceOfCreateCoinRequestBody(value: object): value is CreateCoinRequestBody { +export function instanceOfCreateCoinRequest(value: object): value is CreateCoinRequest { let isInstance = true; isInstance = isInstance && "mint" in value && value["mint"] !== undefined; isInstance = isInstance && "ticker" in value && value["ticker"] !== undefined; @@ -101,11 +101,11 @@ export function instanceOfCreateCoinRequestBody(value: object): value is CreateC return isInstance; } -export function CreateCoinRequestBodyFromJSON(json: any): CreateCoinRequestBody { - return CreateCoinRequestBodyFromJSONTyped(json, false); +export function CreateCoinRequestFromJSON(json: any): CreateCoinRequest { + return CreateCoinRequestFromJSONTyped(json, false); } -export function CreateCoinRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCoinRequestBody { +export function CreateCoinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCoinRequest { if ((json === undefined) || (json === null)) { return json; } @@ -125,7 +125,7 @@ export function CreateCoinRequestBodyFromJSONTyped(json: any, ignoreDiscriminato }; } -export function CreateCoinRequestBodyToJSON(value?: CreateCoinRequestBody | null): any { +export function CreateCoinRequestToJSON(value?: CreateCoinRequest | null): any { if (value === undefined) { return undefined; } 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/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/CreateRewardCodeRequestBody.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateRewardCodeRequest.ts similarity index 67% rename from packages/sdk/src/sdk/api/generated/default/models/CreateRewardCodeRequestBody.ts rename to packages/sdk/src/sdk/api/generated/default/models/CreateRewardCodeRequest.ts index 9712e227d91..44bbad4a730 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CreateRewardCodeRequestBody.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateRewardCodeRequest.ts @@ -17,33 +17,33 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface CreateRewardCodeRequestBody + * @interface CreateRewardCodeRequest */ -export interface CreateRewardCodeRequestBody { +export interface CreateRewardCodeRequest { /** * Base64-encoded Solana Ed25519 signature of the string "code" * @type {string} - * @memberof CreateRewardCodeRequestBody + * @memberof CreateRewardCodeRequest */ signature: string; /** * The coin mint address * @type {string} - * @memberof CreateRewardCodeRequestBody + * @memberof CreateRewardCodeRequest */ mint: string; /** * The reward amount (must be greater than 0) * @type {number} - * @memberof CreateRewardCodeRequestBody + * @memberof CreateRewardCodeRequest */ amount: number; } /** - * Check if a given object implements the CreateRewardCodeRequestBody interface. + * Check if a given object implements the CreateRewardCodeRequest interface. */ -export function instanceOfCreateRewardCodeRequestBody(value: object): value is CreateRewardCodeRequestBody { +export function instanceOfCreateRewardCodeRequest(value: object): value is CreateRewardCodeRequest { let isInstance = true; isInstance = isInstance && "signature" in value && value["signature"] !== undefined; isInstance = isInstance && "mint" in value && value["mint"] !== undefined; @@ -52,11 +52,11 @@ export function instanceOfCreateRewardCodeRequestBody(value: object): value is C return isInstance; } -export function CreateRewardCodeRequestBodyFromJSON(json: any): CreateRewardCodeRequestBody { - return CreateRewardCodeRequestBodyFromJSONTyped(json, false); +export function CreateRewardCodeRequestFromJSON(json: any): CreateRewardCodeRequest { + return CreateRewardCodeRequestFromJSONTyped(json, false); } -export function CreateRewardCodeRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRewardCodeRequestBody { +export function CreateRewardCodeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRewardCodeRequest { if ((json === undefined) || (json === null)) { return json; } @@ -68,7 +68,7 @@ export function CreateRewardCodeRequestBodyFromJSONTyped(json: any, ignoreDiscri }; } -export function CreateRewardCodeRequestBodyToJSON(value?: CreateRewardCodeRequestBody | null): any { +export function CreateRewardCodeRequestToJSON(value?: CreateRewardCodeRequest | null): any { if (value === undefined) { return undefined; } 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/CreateTrackRequestBody.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateTrackRequestBody.ts index 33945056b88..bcae6310e35 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CreateTrackRequestBody.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateTrackRequestBody.ts @@ -20,6 +20,30 @@ import { AccessGateFromJSONTyped, AccessGateToJSON, } from './AccessGate'; +import type { CreatePlaylistRequestBodyCopyrightLine } from './CreatePlaylistRequestBodyCopyrightLine'; +import { + CreatePlaylistRequestBodyCopyrightLineFromJSON, + CreatePlaylistRequestBodyCopyrightLineFromJSONTyped, + CreatePlaylistRequestBodyCopyrightLineToJSON, +} from './CreatePlaylistRequestBodyCopyrightLine'; +import type { CreatePlaylistRequestBodyProducerCopyrightLine } from './CreatePlaylistRequestBodyProducerCopyrightLine'; +import { + CreatePlaylistRequestBodyProducerCopyrightLineFromJSON, + CreatePlaylistRequestBodyProducerCopyrightLineFromJSONTyped, + CreatePlaylistRequestBodyProducerCopyrightLineToJSON, +} from './CreatePlaylistRequestBodyProducerCopyrightLine'; +import type { DdexResourceContributor } from './DdexResourceContributor'; +import { + DdexResourceContributorFromJSON, + DdexResourceContributorFromJSONTyped, + DdexResourceContributorToJSON, +} from './DdexResourceContributor'; +import type { DdexRightsController } from './DdexRightsController'; +import { + DdexRightsControllerFromJSON, + DdexRightsControllerFromJSONTyped, + DdexRightsControllerToJSON, +} from './DdexRightsController'; import type { FieldVisibility } from './FieldVisibility'; import { FieldVisibilityFromJSON, @@ -251,34 +275,34 @@ export interface CreateTrackRequestBody { artists?: Array | null; /** * DDEX resource contributors - * @type {Array} + * @type {Array} * @memberof CreateTrackRequestBody */ - resourceContributors?: Array | null; + resourceContributors?: Array | null; /** * DDEX indirect resource contributors - * @type {Array} + * @type {Array} * @memberof CreateTrackRequestBody */ - indirectResourceContributors?: Array | null; + indirectResourceContributors?: Array | null; /** - * DDEX rights controller - * @type {object} + * + * @type {DdexRightsController} * @memberof CreateTrackRequestBody */ - rightsController?: object | null; + rightsController?: DdexRightsController; /** - * DDEX copyright line - * @type {object} + * + * @type {CreatePlaylistRequestBodyCopyrightLine} * @memberof CreateTrackRequestBody */ - copyrightLine?: object | null; + copyrightLine?: CreatePlaylistRequestBodyCopyrightLine | null; /** - * DDEX producer copyright line - * @type {object} + * + * @type {CreatePlaylistRequestBodyProducerCopyrightLine} * @memberof CreateTrackRequestBody */ - producerCopyrightLine?: object | null; + producerCopyrightLine?: CreatePlaylistRequestBodyProducerCopyrightLine | null; /** * Parental warning type * @type {string} @@ -371,11 +395,11 @@ export function CreateTrackRequestBodyFromJSONTyped(json: any, ignoreDiscriminat 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], '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'], + 'resourceContributors': !exists(json, 'resource_contributors') ? undefined : (json['resource_contributors'] === null ? null : (json['resource_contributors'] as Array).map(DdexResourceContributorFromJSON)), + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : (json['indirect_resource_contributors'] === null ? null : (json['indirect_resource_contributors'] as Array).map(DdexResourceContributorFromJSON)), + 'rightsController': !exists(json, 'rights_controller') ? undefined : DdexRightsControllerFromJSON(json['rights_controller']), + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : CreatePlaylistRequestBodyCopyrightLineFromJSON(json['copyright_line']), + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : CreatePlaylistRequestBodyProducerCopyrightLineFromJSON(json['producer_copyright_line']), 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], @@ -426,11 +450,11 @@ export function CreateTrackRequestBodyToJSON(value?: CreateTrackRequestBody | nu 'ddex_app': value.ddexApp, '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, + 'resource_contributors': value.resourceContributors === undefined ? undefined : (value.resourceContributors === null ? null : (value.resourceContributors as Array).map(DdexResourceContributorToJSON)), + 'indirect_resource_contributors': value.indirectResourceContributors === undefined ? undefined : (value.indirectResourceContributors === null ? null : (value.indirectResourceContributors as Array).map(DdexResourceContributorToJSON)), + 'rights_controller': DdexRightsControllerToJSON(value.rightsController), + 'copyright_line': CreatePlaylistRequestBodyCopyrightLineToJSON(value.copyrightLine), + 'producer_copyright_line': CreatePlaylistRequestBodyProducerCopyrightLineToJSON(value.producerCopyrightLine), 'parental_warning_type': value.parentalWarningType, 'cover_original_song_title': value.coverOriginalSongTitle, 'cover_original_artist': value.coverOriginalArtist, diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateUserDeveloperAppRequestBody.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateUserDeveloperAppRequestBody.ts deleted file mode 100644 index 34d42929d73..00000000000 --- a/packages/sdk/src/sdk/api/generated/default/models/CreateUserDeveloperAppRequestBody.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* 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 CreateUserDeveloperAppRequestBody - */ -export interface CreateUserDeveloperAppRequestBody { - /** - * Developer app name - * @type {string} - * @memberof CreateUserDeveloperAppRequestBody - */ - name: string; -} - -/** - * Check if a given object implements the CreateUserDeveloperAppRequestBody interface. - */ -export function instanceOfCreateUserDeveloperAppRequestBody(value: object): value is CreateUserDeveloperAppRequestBody { - let isInstance = true; - isInstance = isInstance && "name" in value && value["name"] !== undefined; - - return isInstance; -} - -export function CreateUserDeveloperAppRequestBodyFromJSON(json: any): CreateUserDeveloperAppRequestBody { - return CreateUserDeveloperAppRequestBodyFromJSONTyped(json, false); -} - -export function CreateUserDeveloperAppRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUserDeveloperAppRequestBody { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'name': json['name'], - }; -} - -export function CreateUserDeveloperAppRequestBodyToJSON(value?: CreateUserDeveloperAppRequestBody | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateUserDeveloperAppResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateUserDeveloperAppResponse.ts deleted file mode 100644 index c4b6427309c..00000000000 --- a/packages/sdk/src/sdk/api/generated/default/models/CreateUserDeveloperAppResponse.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* 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 CreateUserDeveloperAppResponse - */ -export interface CreateUserDeveloperAppResponse { - /** - * The API key (address) for the developer app - * @type {string} - * @memberof CreateUserDeveloperAppResponse - */ - apiKey?: string; - /** - * The private key for the developer app (for signing) - * @type {string} - * @memberof CreateUserDeveloperAppResponse - */ - apiSecret?: string; - /** - * The bearer token for API authentication (use in Authorization header) - * @type {string} - * @memberof CreateUserDeveloperAppResponse - */ - bearerToken?: string; - /** - * Transaction hash of the creation - * @type {string} - * @memberof CreateUserDeveloperAppResponse - */ - transactionHash?: string; -} - -/** - * Check if a given object implements the CreateUserDeveloperAppResponse interface. - */ -export function instanceOfCreateUserDeveloperAppResponse(value: object): value is CreateUserDeveloperAppResponse { - let isInstance = true; - - return isInstance; -} - -export function CreateUserDeveloperAppResponseFromJSON(json: any): CreateUserDeveloperAppResponse { - return CreateUserDeveloperAppResponseFromJSONTyped(json, false); -} - -export function CreateUserDeveloperAppResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUserDeveloperAppResponse { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'apiKey': !exists(json, 'api_key') ? undefined : json['api_key'], - 'apiSecret': !exists(json, 'api_secret') ? undefined : json['api_secret'], - 'bearerToken': !exists(json, 'bearer_token') ? undefined : json['bearer_token'], - 'transactionHash': !exists(json, 'transaction_hash') ? undefined : json['transaction_hash'], - }; -} - -export function CreateUserDeveloperAppResponseToJSON(value?: CreateUserDeveloperAppResponse | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'api_key': value.apiKey, - 'api_secret': value.apiSecret, - 'bearer_token': value.bearerToken, - 'transaction_hash': value.transactionHash, - }; -} - diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequestBody.ts b/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequestBody.ts index 33a1febb2bb..320321dc80a 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequestBody.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequestBody.ts @@ -14,12 +14,12 @@ */ import { exists, mapValues } from '../runtime'; -import type { CreateUserRequestBodyEvents } from './CreateUserRequestBodyEvents'; +import type { UpdateUserRequestBodyEvents } from './UpdateUserRequestBodyEvents'; import { - CreateUserRequestBodyEventsFromJSON, - CreateUserRequestBodyEventsFromJSONTyped, - CreateUserRequestBodyEventsToJSON, -} from './CreateUserRequestBodyEvents'; + UpdateUserRequestBodyEventsFromJSON, + UpdateUserRequestBodyEventsFromJSONTyped, + UpdateUserRequestBodyEventsToJSON, +} from './UpdateUserRequestBodyEvents'; import type { UserPlaylistLibrary } from './UserPlaylistLibrary'; import { UserPlaylistLibraryFromJSON, @@ -149,10 +149,10 @@ export interface CreateUserRequestBody { playlistLibrary?: UserPlaylistLibrary; /** * - * @type {CreateUserRequestBodyEvents} + * @type {UpdateUserRequestBodyEvents} * @memberof CreateUserRequestBody */ - events?: CreateUserRequestBodyEvents; + events?: UpdateUserRequestBodyEvents; } @@ -205,7 +205,7 @@ export function CreateUserRequestBodyFromJSONTyped(json: any, ignoreDiscriminato 'allowAiAttribution': !exists(json, 'allow_ai_attribution') ? undefined : json['allow_ai_attribution'], 'splUsdcPayoutWallet': !exists(json, 'spl_usdc_payout_wallet') ? undefined : json['spl_usdc_payout_wallet'], 'playlistLibrary': !exists(json, 'playlist_library') ? undefined : UserPlaylistLibraryFromJSON(json['playlist_library']), - 'events': !exists(json, 'events') ? undefined : CreateUserRequestBodyEventsFromJSON(json['events']), + 'events': !exists(json, 'events') ? undefined : UpdateUserRequestBodyEventsFromJSON(json['events']), }; } @@ -237,7 +237,7 @@ export function CreateUserRequestBodyToJSON(value?: CreateUserRequestBody | null 'allow_ai_attribution': value.allowAiAttribution, 'spl_usdc_payout_wallet': value.splUsdcPayoutWallet, 'playlist_library': UserPlaylistLibraryToJSON(value.playlistLibrary), - 'events': CreateUserRequestBodyEventsToJSON(value.events), + 'events': UpdateUserRequestBodyEventsToJSON(value.events), }; } 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/DdexRightsController.ts b/packages/sdk/src/sdk/api/generated/default/models/DdexRightsController.ts new file mode 100644 index 00000000000..093bd163c70 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/DdexRightsController.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'; +/** + * DDEX rights controller + * @export + * @interface DdexRightsController + */ +export interface DdexRightsController { + /** + * + * @type {string} + * @memberof DdexRightsController + */ + name: string; + /** + * + * @type {Array} + * @memberof DdexRightsController + */ + roles: Array; + /** + * Optional + * @type {string} + * @memberof DdexRightsController + */ + rightsShareUnknown?: string; +} + +/** + * Check if a given object implements the DdexRightsController interface. + */ +export function instanceOfDdexRightsController(value: object): value is DdexRightsController { + let isInstance = true; + isInstance = isInstance && "name" in value && value["name"] !== undefined; + isInstance = isInstance && "roles" in value && value["roles"] !== undefined; + + return isInstance; +} + +export function DdexRightsControllerFromJSON(json: any): DdexRightsController { + return DdexRightsControllerFromJSONTyped(json, false); +} + +export function DdexRightsControllerFromJSONTyped(json: any, ignoreDiscriminator: boolean): DdexRightsController { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'roles': json['roles'], + 'rightsShareUnknown': !exists(json, 'rights_share_unknown') ? undefined : json['rights_share_unknown'], + }; +} + +export function DdexRightsControllerToJSON(value?: DdexRightsController | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'roles': value.roles, + 'rights_share_unknown': value.rightsShareUnknown, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/DynamicBondingCurveInsights.ts b/packages/sdk/src/sdk/api/generated/default/models/DynamicBondingCurveInsights.ts new file mode 100644 index 00000000000..1ba16b53743 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/DynamicBondingCurveInsights.ts @@ -0,0 +1,122 @@ +/* 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'; +/** + * Information about the dynamic bonding curve if one exists for the coin + * @export + * @interface DynamicBondingCurveInsights + */ +export interface DynamicBondingCurveInsights { + /** + * Address of the bonding curve pool + * @type {string} + * @memberof DynamicBondingCurveInsights + */ + address?: string; + /** + * Current price in the pool's quote token (e.g., AUDIO) + * @type {number} + * @memberof DynamicBondingCurveInsights + */ + price?: number; + /** + * Current price in USD + * @type {number} + * @memberof DynamicBondingCurveInsights + */ + priceUSD?: number; + /** + * Progress along the bonding curve (0.0 - 1.0) + * @type {number} + * @memberof DynamicBondingCurveInsights + */ + curveProgress?: number; + /** + * Whether the bonding curve has been migrated + * @type {boolean} + * @memberof DynamicBondingCurveInsights + */ + isMigrated?: boolean; + /** + * Creator quote fee for the bonding curve + * @type {number} + * @memberof DynamicBondingCurveInsights + */ + creatorQuoteFee?: number; + /** + * Total trading quote fee accumulated + * @type {number} + * @memberof DynamicBondingCurveInsights + */ + totalTradingQuoteFee?: number; + /** + * Address of the pool creator's wallet + * @type {string} + * @memberof DynamicBondingCurveInsights + */ + creatorWalletAddress?: string; +} + +/** + * Check if a given object implements the DynamicBondingCurveInsights interface. + */ +export function instanceOfDynamicBondingCurveInsights(value: object): value is DynamicBondingCurveInsights { + let isInstance = true; + + return isInstance; +} + +export function DynamicBondingCurveInsightsFromJSON(json: any): DynamicBondingCurveInsights { + return DynamicBondingCurveInsightsFromJSONTyped(json, false); +} + +export function DynamicBondingCurveInsightsFromJSONTyped(json: any, ignoreDiscriminator: boolean): DynamicBondingCurveInsights { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'address': !exists(json, 'address') ? undefined : json['address'], + 'price': !exists(json, 'price') ? undefined : json['price'], + 'priceUSD': !exists(json, 'priceUSD') ? undefined : json['priceUSD'], + 'curveProgress': !exists(json, 'curveProgress') ? undefined : json['curveProgress'], + 'isMigrated': !exists(json, 'isMigrated') ? undefined : json['isMigrated'], + 'creatorQuoteFee': !exists(json, 'creatorQuoteFee') ? undefined : json['creatorQuoteFee'], + 'totalTradingQuoteFee': !exists(json, 'totalTradingQuoteFee') ? undefined : json['totalTradingQuoteFee'], + 'creatorWalletAddress': !exists(json, 'creatorWalletAddress') ? undefined : json['creatorWalletAddress'], + }; +} + +export function DynamicBondingCurveInsightsToJSON(value?: DynamicBondingCurveInsights | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'address': value.address, + 'price': value.price, + 'priceUSD': value.priceUSD, + 'curveProgress': value.curveProgress, + 'isMigrated': value.isMigrated, + 'creatorQuoteFee': value.creatorQuoteFee, + 'totalTradingQuoteFee': value.totalTradingQuoteFee, + 'creatorWalletAddress': value.creatorWalletAddress, + }; +} + 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 index 2802b489b9f..52cab2f27d0 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts @@ -25,37 +25,37 @@ export interface FieldVisibility { * @type {boolean} * @memberof FieldVisibility */ - mood?: boolean; + mood: boolean; /** * * @type {boolean} * @memberof FieldVisibility */ - tags?: boolean; + tags: boolean; /** * * @type {boolean} * @memberof FieldVisibility */ - genre?: boolean; + genre: boolean; /** * * @type {boolean} * @memberof FieldVisibility */ - share?: boolean; + share: boolean; /** * * @type {boolean} * @memberof FieldVisibility */ - playCount?: boolean; + playCount: boolean; /** * * @type {boolean} * @memberof FieldVisibility */ - remixes?: boolean; + remixes: boolean; } /** @@ -63,6 +63,12 @@ export interface FieldVisibility { */ 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; } @@ -77,12 +83,12 @@ export function FieldVisibilityFromJSONTyped(json: any, ignoreDiscriminator: boo } return { - 'mood': !exists(json, 'mood') ? undefined : json['mood'], - 'tags': !exists(json, 'tags') ? undefined : json['tags'], - 'genre': !exists(json, 'genre') ? undefined : json['genre'], - 'share': !exists(json, 'share') ? undefined : json['share'], - 'playCount': !exists(json, 'play_count') ? undefined : json['play_count'], - 'remixes': !exists(json, 'remixes') ? undefined : json['remixes'], + 'mood': json['mood'], + 'tags': json['tags'], + 'genre': json['genre'], + 'share': json['share'], + 'playCount': json['play_count'], + 'remixes': json['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/FollowersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowersResponse.ts index 00ce5b8dc31..837cf475fd3 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/FollowersResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowersResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface FollowersResponse */ export interface FollowersResponse { + /** + * + * @type {number} + * @memberof FollowersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FollowersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FollowersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FollowersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FollowersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FollowersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FollowersResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface FollowersResponse { */ export function instanceOfFollowersResponse(value: object): value is FollowersResponse { 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; } @@ -54,6 +109,13 @@ export function FollowersResponseFromJSONTyped(json: any, ignoreDiscriminator: b } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function FollowersResponseToJSON(value?: FollowersResponse | null): any { } 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(UserToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/FollowingResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowingResponse.ts index 800c48641a5..ed249b0c358 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/FollowingResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowingResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface FollowingResponse */ export interface FollowingResponse { + /** + * + * @type {number} + * @memberof FollowingResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FollowingResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FollowingResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FollowingResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FollowingResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FollowingResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FollowingResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface FollowingResponse { */ export function instanceOfFollowingResponse(value: object): value is FollowingResponse { 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; } @@ -54,6 +109,13 @@ export function FollowingResponseFromJSONTyped(json: any, ignoreDiscriminator: b } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function FollowingResponseToJSON(value?: FollowingResponse | null): any { } 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(UserToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/GetSupportedUsers.ts b/packages/sdk/src/sdk/api/generated/default/models/GetSupportedUsers.ts index cf20d0578bb..1e36d101826 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/GetSupportedUsers.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/GetSupportedUsers.ts @@ -20,6 +20,12 @@ import { SupportingFromJSONTyped, SupportingToJSON, } from './Supporting'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface GetSupportedUsers */ export interface GetSupportedUsers { + /** + * + * @type {number} + * @memberof GetSupportedUsers + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof GetSupportedUsers + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof GetSupportedUsers + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof GetSupportedUsers + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof GetSupportedUsers + */ + signature: string; + /** + * + * @type {string} + * @memberof GetSupportedUsers + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof GetSupportedUsers + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface GetSupportedUsers { */ export function instanceOfGetSupportedUsers(value: object): value is GetSupportedUsers { 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; } @@ -54,6 +109,13 @@ export function GetSupportedUsersFromJSONTyped(json: any, ignoreDiscriminator: b } 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(SupportingFromJSON)), }; } @@ -67,6 +129,13 @@ export function GetSupportedUsersToJSON(value?: GetSupportedUsers | null): any { } 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(SupportingToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/GetSupporter.ts b/packages/sdk/src/sdk/api/generated/default/models/GetSupporter.ts new file mode 100644 index 00000000000..ee3b709320d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/GetSupporter.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 { Supporter } from './Supporter'; +import { + SupporterFromJSON, + SupporterFromJSONTyped, + SupporterToJSON, +} from './Supporter'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface GetSupporter + */ +export interface GetSupporter { + /** + * + * @type {number} + * @memberof GetSupporter + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof GetSupporter + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof GetSupporter + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof GetSupporter + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof GetSupporter + */ + signature: string; + /** + * + * @type {string} + * @memberof GetSupporter + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof GetSupporter + */ + version: VersionMetadata; + /** + * + * @type {Supporter} + * @memberof GetSupporter + */ + data?: Supporter; +} + +/** + * Check if a given object implements the GetSupporter interface. + */ +export function instanceOfGetSupporter(value: object): value is GetSupporter { + 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 GetSupporterFromJSON(json: any): GetSupporter { + return GetSupporterFromJSONTyped(json, false); +} + +export function GetSupporterFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSupporter { + 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 : SupporterFromJSON(json['data']), + }; +} + +export function GetSupporterToJSON(value?: GetSupporter | 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': SupporterToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/GetSupporters.ts b/packages/sdk/src/sdk/api/generated/default/models/GetSupporters.ts index 19af648def2..225b1665f0a 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/GetSupporters.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/GetSupporters.ts @@ -20,6 +20,12 @@ import { SupporterFromJSONTyped, SupporterToJSON, } from './Supporter'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface GetSupporters */ export interface GetSupporters { + /** + * + * @type {number} + * @memberof GetSupporters + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof GetSupporters + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof GetSupporters + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof GetSupporters + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof GetSupporters + */ + signature: string; + /** + * + * @type {string} + * @memberof GetSupporters + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof GetSupporters + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface GetSupporters { */ export function instanceOfGetSupporters(value: object): value is GetSupporters { 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; } @@ -54,6 +109,13 @@ export function GetSupportersFromJSONTyped(json: any, ignoreDiscriminator: boole } 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(SupporterFromJSON)), }; } @@ -67,6 +129,13 @@ export function GetSupportersToJSON(value?: GetSupporters | null): any { } 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(SupporterToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/GetSupporting.ts b/packages/sdk/src/sdk/api/generated/default/models/GetSupporting.ts new file mode 100644 index 00000000000..8a8ec6d74c7 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/GetSupporting.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 { Supporting } from './Supporting'; +import { + SupportingFromJSON, + SupportingFromJSONTyped, + SupportingToJSON, +} from './Supporting'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface GetSupporting + */ +export interface GetSupporting { + /** + * + * @type {number} + * @memberof GetSupporting + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof GetSupporting + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof GetSupporting + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof GetSupporting + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof GetSupporting + */ + signature: string; + /** + * + * @type {string} + * @memberof GetSupporting + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof GetSupporting + */ + version: VersionMetadata; + /** + * + * @type {Supporting} + * @memberof GetSupporting + */ + data?: Supporting; +} + +/** + * Check if a given object implements the GetSupporting interface. + */ +export function instanceOfGetSupporting(value: object): value is GetSupporting { + 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 GetSupportingFromJSON(json: any): GetSupporting { + return GetSupportingFromJSONTyped(json, false); +} + +export function GetSupportingFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSupporting { + 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 : SupportingFromJSON(json['data']), + }; +} + +export function GetSupportingToJSON(value?: GetSupporting | 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': SupportingToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/GetTipsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/GetTipsResponse.ts index ad152a61612..cecd43e954c 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/GetTipsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/GetTipsResponse.ts @@ -20,6 +20,12 @@ import { TipFromJSONTyped, TipToJSON, } from './Tip'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface GetTipsResponse */ export interface GetTipsResponse { + /** + * + * @type {number} + * @memberof GetTipsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof GetTipsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof GetTipsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof GetTipsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof GetTipsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof GetTipsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof GetTipsResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface GetTipsResponse { */ export function instanceOfGetTipsResponse(value: object): value is GetTipsResponse { 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; } @@ -54,6 +109,13 @@ export function GetTipsResponseFromJSONTyped(json: any, ignoreDiscriminator: boo } 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(TipFromJSON)), }; } @@ -67,6 +129,13 @@ export function GetTipsResponseToJSON(value?: GetTipsResponse | null): any { } 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(TipToJSON)), }; } 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/HistoryResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/HistoryResponse.ts index 717e72e96d5..74f638c1a6e 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/HistoryResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/HistoryResponse.ts @@ -20,6 +20,12 @@ import { TrackActivityFromJSONTyped, TrackActivityToJSON, } from './TrackActivity'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface HistoryResponse */ export interface HistoryResponse { + /** + * + * @type {number} + * @memberof HistoryResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof HistoryResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof HistoryResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof HistoryResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof HistoryResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof HistoryResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof HistoryResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface HistoryResponse { */ export function instanceOfHistoryResponse(value: object): value is HistoryResponse { 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; } @@ -54,6 +109,13 @@ export function HistoryResponseFromJSONTyped(json: any, ignoreDiscriminator: boo } 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(TrackActivityFromJSON)), }; } @@ -67,6 +129,13 @@ export function HistoryResponseToJSON(value?: HistoryResponse | null): any { } 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(TrackActivityToJSON)), }; } 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..eaa89a8aea9 --- /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 { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface ManagedUser + */ +export interface ManagedUser { + /** + * + * @type {User} + * @memberof ManagedUser + */ + user: User; + /** + * + * @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': UserFromJSON(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': UserToJSON(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/MutualFollowersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/MutualFollowersResponse.ts index 1ed7a491a25..18829b685eb 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/MutualFollowersResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/MutualFollowersResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface MutualFollowersResponse */ export interface MutualFollowersResponse { + /** + * + * @type {number} + * @memberof MutualFollowersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof MutualFollowersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof MutualFollowersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof MutualFollowersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof MutualFollowersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof MutualFollowersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof MutualFollowersResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface MutualFollowersResponse { */ export function instanceOfMutualFollowersResponse(value: object): value is MutualFollowersResponse { 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; } @@ -54,6 +109,13 @@ export function MutualFollowersResponseFromJSONTyped(json: any, ignoreDiscrimina } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function MutualFollowersResponseToJSON(value?: MutualFollowersResponse | } 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(UserToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/NftCollection.ts b/packages/sdk/src/sdk/api/generated/default/models/NftCollection.ts new file mode 100644 index 00000000000..9a275dcfbb0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/NftCollection.ts @@ -0,0 +1,129 @@ +/* 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 NftCollection + */ +export interface NftCollection { + /** + * + * @type {string} + * @memberof NftCollection + */ + chain: NftCollectionChainEnum; + /** + * + * @type {string} + * @memberof NftCollection + */ + standard?: NftCollectionStandardEnum; + /** + * + * @type {string} + * @memberof NftCollection + */ + address: string; + /** + * + * @type {string} + * @memberof NftCollection + */ + name: string; + /** + * + * @type {string} + * @memberof NftCollection + */ + imageUrl?: string; + /** + * + * @type {string} + * @memberof NftCollection + */ + externalLink?: string; +} + + +/** + * @export + */ +export const NftCollectionChainEnum = { + Eth: 'eth', + Sol: 'sol' +} as const; +export type NftCollectionChainEnum = typeof NftCollectionChainEnum[keyof typeof NftCollectionChainEnum]; + +/** + * @export + */ +export const NftCollectionStandardEnum = { + Erc721: 'ERC721', + Erc1155: 'ERC1155' +} as const; +export type NftCollectionStandardEnum = typeof NftCollectionStandardEnum[keyof typeof NftCollectionStandardEnum]; + + +/** + * Check if a given object implements the NftCollection interface. + */ +export function instanceOfNftCollection(value: object): value is NftCollection { + let isInstance = true; + isInstance = isInstance && "chain" in value && value["chain"] !== undefined; + isInstance = isInstance && "address" in value && value["address"] !== undefined; + isInstance = isInstance && "name" in value && value["name"] !== undefined; + + return isInstance; +} + +export function NftCollectionFromJSON(json: any): NftCollection { + return NftCollectionFromJSONTyped(json, false); +} + +export function NftCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): NftCollection { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'chain': json['chain'], + 'standard': !exists(json, 'standard') ? undefined : json['standard'], + 'address': json['address'], + 'name': json['name'], + 'imageUrl': !exists(json, 'imageUrl') ? undefined : json['imageUrl'], + 'externalLink': !exists(json, 'externalLink') ? undefined : json['externalLink'], + }; +} + +export function NftCollectionToJSON(value?: NftCollection | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'chain': value.chain, + 'standard': value.standard, + 'address': value.address, + 'name': value.name, + 'imageUrl': value.imageUrl, + 'externalLink': value.externalLink, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/NftGate.ts b/packages/sdk/src/sdk/api/generated/default/models/NftGate.ts new file mode 100644 index 00000000000..fc60b56daad --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/NftGate.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'; +import type { NftCollection } from './NftCollection'; +import { + NftCollectionFromJSON, + NftCollectionFromJSONTyped, + NftCollectionToJSON, +} from './NftCollection'; + +/** + * + * @export + * @interface NftGate + */ +export interface NftGate { + /** + * Must hold an NFT of the given collection to unlock + * @type {NftCollection} + * @memberof NftGate + */ + nftCollection: NftCollection; +} + +/** + * Check if a given object implements the NftGate interface. + */ +export function instanceOfNftGate(value: object): value is NftGate { + let isInstance = true; + isInstance = isInstance && "nftCollection" in value && value["nftCollection"] !== undefined; + + return isInstance; +} + +export function NftGateFromJSON(json: any): NftGate { + return NftGateFromJSONTyped(json, false); +} + +export function NftGateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NftGate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'nftCollection': NftCollectionFromJSON(json['nft_collection']), + }; +} + +export function NftGateToJSON(value?: NftGate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'nft_collection': NftCollectionToJSON(value.nftCollection), + }; +} + 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/PlaylistAddedTimestamp.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistAddedTimestamp.ts index 702afac2f9f..ba7e8be0c7d 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/PlaylistAddedTimestamp.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistAddedTimestamp.ts @@ -21,23 +21,23 @@ import { exists, mapValues } from '../runtime'; */ export interface PlaylistAddedTimestamp { /** - * Track ID - * @type {string} + * Optional. Metadata timestamp for when the track was added to the playlist. + * @type {number} * @memberof PlaylistAddedTimestamp */ - trackId: string; + metadataTimestamp?: number; /** - * Unix timestamp when track was added + * * @type {number} * @memberof PlaylistAddedTimestamp */ timestamp: number; /** - * Metadata timestamp - * @type {number} + * + * @type {string} * @memberof PlaylistAddedTimestamp */ - metadataTimestamp?: number; + trackId: string; } /** @@ -45,8 +45,8 @@ export interface PlaylistAddedTimestamp { */ export function instanceOfPlaylistAddedTimestamp(value: object): value is PlaylistAddedTimestamp { let isInstance = true; - isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; return isInstance; } @@ -61,9 +61,9 @@ export function PlaylistAddedTimestampFromJSONTyped(json: any, ignoreDiscriminat } return { - 'trackId': json['track_id'], - 'timestamp': json['timestamp'], 'metadataTimestamp': !exists(json, 'metadata_timestamp') ? undefined : json['metadata_timestamp'], + 'timestamp': json['timestamp'], + 'trackId': json['track_id'], }; } @@ -76,9 +76,9 @@ export function PlaylistAddedTimestampToJSON(value?: PlaylistAddedTimestamp | nu } return { - 'track_id': value.trackId, - 'timestamp': value.timestamp, 'metadata_timestamp': value.metadataTimestamp, + 'timestamp': value.timestamp, + 'track_id': value.trackId, }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtwork.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtwork.ts index 1e55fc63c65..9a28491edae 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtwork.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtwork.ts @@ -38,6 +38,12 @@ export interface PlaylistArtwork { * @memberof PlaylistArtwork */ _1000x1000?: string; + /** + * + * @type {Array} + * @memberof PlaylistArtwork + */ + mirrors?: Array; } /** @@ -62,6 +68,7 @@ export function PlaylistArtworkFromJSONTyped(json: any, ignoreDiscriminator: boo '_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'], }; } @@ -77,6 +84,7 @@ export function PlaylistArtworkToJSON(value?: PlaylistArtwork | null): any { '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..fb64f73c0b6 --- /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 { Playlist } from './Playlist'; +import { + PlaylistFromJSON, + PlaylistFromJSONTyped, + PlaylistToJSON, +} from './Playlist'; + +/** + * + * @export + * @interface PlaylistFeedItem + */ +export interface PlaylistFeedItem { + /** + * + * @type {string} + * @memberof PlaylistFeedItem + */ + type: string; + /** + * + * @type {Playlist} + * @memberof PlaylistFeedItem + */ + item: Playlist; +} + +/** + * 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': PlaylistFromJSON(json['item']), + }; +} + +export function PlaylistFeedItemToJSON(value?: PlaylistFeedItem | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'item': PlaylistToJSON(value.item), + }; +} + 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/PlaylistResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistResponse.ts index 0660ea9ee9e..f27671cfe3a 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/PlaylistResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistResponse.ts @@ -20,6 +20,12 @@ import { PlaylistFromJSONTyped, PlaylistToJSON, } from './Playlist'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface PlaylistResponse */ export interface PlaylistResponse { + /** + * + * @type {number} + * @memberof PlaylistResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PlaylistResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PlaylistResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PlaylistResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PlaylistResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PlaylistResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PlaylistResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface PlaylistResponse { */ export function instanceOfPlaylistResponse(value: object): value is PlaylistResponse { 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; } @@ -54,6 +109,13 @@ export function PlaylistResponseFromJSONTyped(json: any, ignoreDiscriminator: bo } 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(PlaylistFromJSON)), }; } @@ -67,6 +129,13 @@ export function PlaylistResponseToJSON(value?: PlaylistResponse | null): any { } 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(PlaylistToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistTracksResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistTracksResponse.ts index ee10ecb1b8d..ce487ee1888 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/PlaylistTracksResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistTracksResponse.ts @@ -20,6 +20,12 @@ import { TrackFromJSONTyped, TrackToJSON, } from './Track'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface PlaylistTracksResponse */ export interface PlaylistTracksResponse { + /** + * + * @type {number} + * @memberof PlaylistTracksResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PlaylistTracksResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PlaylistTracksResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PlaylistTracksResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PlaylistTracksResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PlaylistTracksResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PlaylistTracksResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface PlaylistTracksResponse { */ export function instanceOfPlaylistTracksResponse(value: object): value is PlaylistTracksResponse { 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; } @@ -54,6 +109,13 @@ export function PlaylistTracksResponseFromJSONTyped(json: any, ignoreDiscriminat } 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(TrackFromJSON)), }; } @@ -67,6 +129,13 @@ export function PlaylistTracksResponseToJSON(value?: PlaylistTracksResponse | nu } 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(TrackToJSON)), }; } 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/PlaylistWithoutTracks.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistWithoutTracks.ts new file mode 100644 index 00000000000..331924df057 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistWithoutTracks.ts @@ -0,0 +1,452 @@ +/* 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 { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface PlaylistWithoutTracks + */ +export interface PlaylistWithoutTracks { + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistWithoutTracks + */ + artwork?: PlaylistArtwork; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + description?: string; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + permalink: string; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + id: string; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof PlaylistWithoutTracks + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof PlaylistWithoutTracks + */ + repostCount: number; + /** + * + * @type {number} + * @memberof PlaylistWithoutTracks + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof PlaylistWithoutTracks + */ + totalPlayCount: number; + /** + * + * @type {User} + * @memberof PlaylistWithoutTracks + */ + user: User; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof PlaylistWithoutTracks + */ + access: Access; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + upc?: string; + /** + * + * @type {number} + * @memberof PlaylistWithoutTracks + */ + trackCount: number; + /** + * + * @type {number} + * @memberof PlaylistWithoutTracks + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof PlaylistWithoutTracks + */ + followeeReposts: Array; + /** + * + * @type {Array} + * @memberof PlaylistWithoutTracks + */ + followeeFavorites: Array; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof PlaylistWithoutTracks + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + userId: string; + /** + * + * @type {Array} + * @memberof PlaylistWithoutTracks + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistWithoutTracks + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof PlaylistWithoutTracks + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof PlaylistWithoutTracks + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof PlaylistWithoutTracks + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof PlaylistWithoutTracks + */ + artists?: Array; + /** + * + * @type {object} + * @memberof PlaylistWithoutTracks + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof PlaylistWithoutTracks + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof PlaylistWithoutTracks + */ + parentalWarningType?: string | null; +} + +/** + * Check if a given object implements the PlaylistWithoutTracks interface. + */ +export function instanceOfPlaylistWithoutTracks(value: object): value is PlaylistWithoutTracks { + 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 PlaylistWithoutTracksFromJSON(json: any): PlaylistWithoutTracks { + return PlaylistWithoutTracksFromJSONTyped(json, false); +} + +export function PlaylistWithoutTracksFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistWithoutTracks { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : PlaylistArtworkFromJSON(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': UserFromJSON(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(TrackFromJSON)), + '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 PlaylistWithoutTracksToJSON(value?: PlaylistWithoutTracks | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': PlaylistArtworkToJSON(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': UserToJSON(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(TrackToJSON)), + '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/PlaylistsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistsResponse.ts index 035543fd926..d3f7fa3d72e 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/PlaylistsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistsResponse.ts @@ -14,12 +14,18 @@ */ import { exists, mapValues } from '../runtime'; -import type { Playlist } from './Playlist'; +import type { PlaylistWithoutTracks } from './PlaylistWithoutTracks'; import { - PlaylistFromJSON, - PlaylistFromJSONTyped, - PlaylistToJSON, -} from './Playlist'; + PlaylistWithoutTracksFromJSON, + PlaylistWithoutTracksFromJSONTyped, + PlaylistWithoutTracksToJSON, +} from './PlaylistWithoutTracks'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -29,10 +35,52 @@ import { export interface PlaylistsResponse { /** * - * @type {Array} + * @type {number} + * @memberof PlaylistsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PlaylistsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PlaylistsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PlaylistsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PlaylistsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PlaylistsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PlaylistsResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} * @memberof PlaylistsResponse */ - data?: Array; + data?: Array; } /** @@ -40,6 +88,13 @@ export interface PlaylistsResponse { */ export function instanceOfPlaylistsResponse(value: object): value is PlaylistsResponse { 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; } @@ -54,7 +109,14 @@ export function PlaylistsResponseFromJSONTyped(json: any, ignoreDiscriminator: b } return { - 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(PlaylistFromJSON)), + '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(PlaylistWithoutTracksFromJSON)), }; } @@ -67,7 +129,14 @@ export function PlaylistsResponseToJSON(value?: PlaylistsResponse | null): any { } return { - 'data': value.data === undefined ? undefined : ((value.data as Array).map(PlaylistToJSON)), + '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(PlaylistWithoutTracksToJSON)), }; } 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/PurchaseGate.ts b/packages/sdk/src/sdk/api/generated/default/models/PurchaseGate.ts new file mode 100644 index 00000000000..42fb48b2cec --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PurchaseGate.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'; +import type { UsdcGate } from './UsdcGate'; +import { + UsdcGateFromJSON, + UsdcGateFromJSONTyped, + UsdcGateToJSON, +} from './UsdcGate'; + +/** + * + * @export + * @interface PurchaseGate + */ +export interface PurchaseGate { + /** + * Must pay the total price and split to the given addresses to unlock + * @type {UsdcGate} + * @memberof PurchaseGate + */ + usdcPurchase: UsdcGate; +} + +/** + * Check if a given object implements the PurchaseGate interface. + */ +export function instanceOfPurchaseGate(value: object): value is PurchaseGate { + let isInstance = true; + isInstance = isInstance && "usdcPurchase" in value && value["usdcPurchase"] !== undefined; + + return isInstance; +} + +export function PurchaseGateFromJSON(json: any): PurchaseGate { + return PurchaseGateFromJSONTyped(json, false); +} + +export function PurchaseGateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PurchaseGate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'usdcPurchase': UsdcGateFromJSON(json['usdc_purchase']), + }; +} + +export function PurchaseGateToJSON(value?: PurchaseGate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'usdc_purchase': UsdcGateToJSON(value.usdcPurchase), + }; +} + 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/PurchasersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/PurchasersResponse.ts index e48a87cd745..8dbe812e622 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/PurchasersResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/PurchasersResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface PurchasersResponse */ export interface PurchasersResponse { + /** + * + * @type {number} + * @memberof PurchasersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PurchasersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PurchasersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PurchasersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PurchasersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof PurchasersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PurchasersResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface PurchasersResponse { */ export function instanceOfPurchasersResponse(value: object): value is PurchasersResponse { 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; } @@ -54,6 +109,13 @@ export function PurchasersResponseFromJSONTyped(json: any, ignoreDiscriminator: } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function PurchasersResponseToJSON(value?: PurchasersResponse | null): any } 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(UserToJSON)), }; } 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/UsersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/Reactions.ts similarity index 52% rename from packages/sdk/src/sdk/api/generated/default/models/UsersResponse.ts rename to packages/sdk/src/sdk/api/generated/default/models/Reactions.ts index 33dd893a5f0..2c0a6cb8745 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/UsersResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Reactions.ts @@ -14,51 +14,51 @@ */ import { exists, mapValues } from '../runtime'; -import type { User } from './User'; +import type { Reaction } from './Reaction'; import { - UserFromJSON, - UserFromJSONTyped, - UserToJSON, -} from './User'; + ReactionFromJSON, + ReactionFromJSONTyped, + ReactionToJSON, +} from './Reaction'; /** * * @export - * @interface UsersResponse + * @interface Reactions */ -export interface UsersResponse { +export interface Reactions { /** * - * @type {Array} - * @memberof UsersResponse + * @type {Array} + * @memberof Reactions */ - data?: Array; + data?: Array; } /** - * Check if a given object implements the UsersResponse interface. + * Check if a given object implements the Reactions interface. */ -export function instanceOfUsersResponse(value: object): value is UsersResponse { +export function instanceOfReactions(value: object): value is Reactions { let isInstance = true; return isInstance; } -export function UsersResponseFromJSON(json: any): UsersResponse { - return UsersResponseFromJSONTyped(json, false); +export function ReactionsFromJSON(json: any): Reactions { + return ReactionsFromJSONTyped(json, false); } -export function UsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersResponse { +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(UserFromJSON)), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(ReactionFromJSON)), }; } -export function UsersResponseToJSON(value?: UsersResponse | null): any { +export function ReactionsToJSON(value?: Reactions | null): any { if (value === undefined) { return undefined; } @@ -67,7 +67,7 @@ export function UsersResponseToJSON(value?: UsersResponse | null): any { } return { - 'data': value.data === undefined ? undefined : ((value.data as Array).map(UserToJSON)), + '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/Related.ts b/packages/sdk/src/sdk/api/generated/default/models/Related.ts new file mode 100644 index 00000000000..f0575f6407a --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Related.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 { Playlist } from './Playlist'; +import { + PlaylistFromJSON, + PlaylistFromJSONTyped, + PlaylistToJSON, +} from './Playlist'; +import type { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface Related + */ +export interface Related { + /** + * + * @type {Array} + * @memberof Related + */ + users?: Array; + /** + * + * @type {Array} + * @memberof Related + */ + tracks?: Array; + /** + * + * @type {Array} + * @memberof Related + */ + playlists?: Array; +} + +/** + * Check if a given object implements the Related interface. + */ +export function instanceOfRelated(value: object): value is Related { + let isInstance = true; + + return isInstance; +} + +export function RelatedFromJSON(json: any): Related { + return RelatedFromJSONTyped(json, false); +} + +export function RelatedFromJSONTyped(json: any, ignoreDiscriminator: boolean): Related { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'users': !exists(json, 'users') ? undefined : ((json['users'] as Array).map(UserFromJSON)), + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(TrackFromJSON)), + 'playlists': !exists(json, 'playlists') ? undefined : ((json['playlists'] as Array).map(PlaylistFromJSON)), + }; +} + +export function RelatedToJSON(value?: Related | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'users': value.users === undefined ? undefined : ((value.users as Array).map(UserToJSON)), + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(TrackToJSON)), + 'playlists': value.playlists === undefined ? undefined : ((value.playlists as Array).map(PlaylistToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RelatedArtistResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/RelatedArtistResponse.ts index 12dabe34f3b..d0d3bb70d0c 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/RelatedArtistResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/RelatedArtistResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface RelatedArtistResponse */ export interface RelatedArtistResponse { + /** + * + * @type {number} + * @memberof RelatedArtistResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof RelatedArtistResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof RelatedArtistResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof RelatedArtistResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof RelatedArtistResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof RelatedArtistResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof RelatedArtistResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface RelatedArtistResponse { */ export function instanceOfRelatedArtistResponse(value: object): value is RelatedArtistResponse { 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; } @@ -54,6 +109,13 @@ export function RelatedArtistResponseFromJSONTyped(json: any, ignoreDiscriminato } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function RelatedArtistResponseToJSON(value?: RelatedArtistResponse | 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(UserToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/Remix.ts b/packages/sdk/src/sdk/api/generated/default/models/Remix.ts new file mode 100644 index 00000000000..34d1234004f --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Remix.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 { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface Remix + */ +export interface Remix { + /** + * + * @type {string} + * @memberof Remix + */ + parentTrackId: string; + /** + * + * @type {User} + * @memberof Remix + */ + user: User; + /** + * + * @type {boolean} + * @memberof Remix + */ + hasRemixAuthorReposted: boolean; + /** + * + * @type {boolean} + * @memberof Remix + */ + hasRemixAuthorSaved: boolean; +} + +/** + * Check if a given object implements the Remix interface. + */ +export function instanceOfRemix(value: object): value is Remix { + 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 RemixFromJSON(json: any): Remix { + return RemixFromJSONTyped(json, false); +} + +export function RemixFromJSONTyped(json: any, ignoreDiscriminator: boolean): Remix { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'parentTrackId': json['parent_track_id'], + 'user': UserFromJSON(json['user']), + 'hasRemixAuthorReposted': json['has_remix_author_reposted'], + 'hasRemixAuthorSaved': json['has_remix_author_saved'], + }; +} + +export function RemixToJSON(value?: Remix | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'parent_track_id': value.parentTrackId, + 'user': UserToJSON(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/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/RemixParent.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixParent.ts index 0a63ff33b56..f4b1d946cf0 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/RemixParent.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixParent.ts @@ -14,12 +14,12 @@ */ import { exists, mapValues } from '../runtime'; -import type { TrackElement } from './TrackElement'; +import type { Remix } from './Remix'; import { - TrackElementFromJSON, - TrackElementFromJSONTyped, - TrackElementToJSON, -} from './TrackElement'; + RemixFromJSON, + RemixFromJSONTyped, + RemixToJSON, +} from './Remix'; /** * @@ -29,10 +29,10 @@ import { export interface RemixParent { /** * - * @type {Array} + * @type {Array} * @memberof RemixParent */ - tracks?: Array; + tracks?: Array; } /** @@ -54,7 +54,7 @@ export function RemixParentFromJSONTyped(json: any, ignoreDiscriminator: boolean } return { - 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(TrackElementFromJSON)), + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(RemixFromJSON)), }; } @@ -67,7 +67,7 @@ export function RemixParentToJSON(value?: RemixParent | null): any { } return { - 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(TrackElementToJSON)), + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(RemixToJSON)), }; } 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..2202375682c --- /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 { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; +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(TrackFromJSON)), + }; +} + +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(TrackToJSON)), + }; +} + 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/RemixersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixersResponse.ts index 7a8a528ec8e..8ed23869d1a 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/RemixersResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixersResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface RemixersResponse */ export interface RemixersResponse { + /** + * + * @type {number} + * @memberof RemixersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof RemixersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof RemixersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof RemixersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof RemixersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof RemixersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof RemixersResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface RemixersResponse { */ export function instanceOfRemixersResponse(value: object): value is RemixersResponse { 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; } @@ -54,6 +109,13 @@ export function RemixersResponseFromJSONTyped(json: any, ignoreDiscriminator: bo } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function RemixersResponseToJSON(value?: RemixersResponse | null): any { } 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(UserToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/RemixingResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixingResponse.ts index 42abb4c51cc..009a0c339cb 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/RemixingResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixingResponse.ts @@ -20,6 +20,12 @@ import { TrackFromJSONTyped, TrackToJSON, } from './Track'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface RemixingResponse */ export interface RemixingResponse { + /** + * + * @type {number} + * @memberof RemixingResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof RemixingResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof RemixingResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof RemixingResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof RemixingResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof RemixingResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof RemixingResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface RemixingResponse { */ export function instanceOfRemixingResponse(value: object): value is RemixingResponse { 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; } @@ -54,6 +109,13 @@ export function RemixingResponseFromJSONTyped(json: any, ignoreDiscriminator: bo } 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(TrackFromJSON)), }; } @@ -67,6 +129,13 @@ export function RemixingResponseToJSON(value?: RemixingResponse | null): any { } 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(TrackToJSON)), }; } 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/Reposts.ts b/packages/sdk/src/sdk/api/generated/default/models/Reposts.ts index 86d5591b40e..82b4fae4a09 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Reposts.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Reposts.ts @@ -20,6 +20,12 @@ import { ActivityFromJSONTyped, ActivityToJSON, } from './Activity'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface Reposts */ export interface Reposts { + /** + * + * @type {number} + * @memberof Reposts + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof Reposts + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof Reposts + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof Reposts + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof Reposts + */ + signature: string; + /** + * + * @type {string} + * @memberof Reposts + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof Reposts + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface Reposts { */ export function instanceOfReposts(value: object): value is Reposts { 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; } @@ -54,6 +109,13 @@ export function RepostsFromJSONTyped(json: any, ignoreDiscriminator: boolean): R } 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(ActivityFromJSON)), }; } @@ -67,6 +129,13 @@ export function RepostsToJSON(value?: Reposts | null): any { } 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(ActivityToJSON)), }; } 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/CoinRewardPool.ts b/packages/sdk/src/sdk/api/generated/default/models/RewardPool.ts similarity index 58% rename from packages/sdk/src/sdk/api/generated/default/models/CoinRewardPool.ts rename to packages/sdk/src/sdk/api/generated/default/models/RewardPool.ts index 5ef5d9a159e..202ad93d5d9 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinRewardPool.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/RewardPool.ts @@ -15,39 +15,39 @@ import { exists, mapValues } from '../runtime'; /** - * Information about the reward pool associated with the coin. + * Reward pool for the coin * @export - * @interface CoinRewardPool + * @interface RewardPool */ -export interface CoinRewardPool { +export interface RewardPool { /** - * The address of the reward pool. + * Reward pool contract address * @type {string} - * @memberof CoinRewardPool + * @memberof RewardPool */ address?: string; /** - * The current balance of the reward pool. + * Reward pool balance * @type {number} - * @memberof CoinRewardPool + * @memberof RewardPool */ balance?: number; } /** - * Check if a given object implements the CoinRewardPool interface. + * Check if a given object implements the RewardPool interface. */ -export function instanceOfCoinRewardPool(value: object): value is CoinRewardPool { +export function instanceOfRewardPool(value: object): value is RewardPool { let isInstance = true; return isInstance; } -export function CoinRewardPoolFromJSON(json: any): CoinRewardPool { - return CoinRewardPoolFromJSONTyped(json, false); +export function RewardPoolFromJSON(json: any): RewardPool { + return RewardPoolFromJSONTyped(json, false); } -export function CoinRewardPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinRewardPool { +export function RewardPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean): RewardPool { if ((json === undefined) || (json === null)) { return json; } @@ -58,7 +58,7 @@ export function CoinRewardPoolFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function CoinRewardPoolToJSON(value?: CoinRewardPool | null): any { +export function RewardPoolToJSON(value?: RewardPool | null): any { if (value === undefined) { return undefined; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/SaleJson.ts b/packages/sdk/src/sdk/api/generated/default/models/SaleJson.ts index 5181e21dc21..2180192d21f 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/SaleJson.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/SaleJson.ts @@ -27,7 +27,7 @@ export interface SaleJson { */ title?: string; /** - * Full URL link to the content + * URL link to the content * @type {string} * @memberof SaleJson */ 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/SearchModel.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchModel.ts new file mode 100644 index 00000000000..b509e077537 --- /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 { SearchPlaylist } from './SearchPlaylist'; +import { + SearchPlaylistFromJSON, + SearchPlaylistFromJSONTyped, + SearchPlaylistToJSON, +} from './SearchPlaylist'; +import type { SearchTrack } from './SearchTrack'; +import { + SearchTrackFromJSON, + SearchTrackFromJSONTyped, + SearchTrackToJSON, +} from './SearchTrack'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @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(UserFromJSON)), + 'followedUsers': !exists(json, 'followed_users') ? undefined : ((json['followed_users'] as Array).map(UserFromJSON)), + 'tracks': ((json['tracks'] as Array).map(SearchTrackFromJSON)), + 'savedTracks': !exists(json, 'saved_tracks') ? undefined : ((json['saved_tracks'] as Array).map(SearchTrackFromJSON)), + 'playlists': ((json['playlists'] as Array).map(SearchPlaylistFromJSON)), + 'savedPlaylists': !exists(json, 'saved_playlists') ? undefined : ((json['saved_playlists'] as Array).map(SearchPlaylistFromJSON)), + 'albums': ((json['albums'] as Array).map(SearchPlaylistFromJSON)), + 'savedAlbums': !exists(json, 'saved_albums') ? undefined : ((json['saved_albums'] as Array).map(SearchPlaylistFromJSON)), + }; +} + +export function SearchModelToJSON(value?: SearchModel | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'users': ((value.users as Array).map(UserToJSON)), + 'followed_users': value.followedUsers === undefined ? undefined : ((value.followedUsers as Array).map(UserToJSON)), + 'tracks': ((value.tracks as Array).map(SearchTrackToJSON)), + 'saved_tracks': value.savedTracks === undefined ? undefined : ((value.savedTracks as Array).map(SearchTrackToJSON)), + 'playlists': ((value.playlists as Array).map(SearchPlaylistToJSON)), + 'saved_playlists': value.savedPlaylists === undefined ? undefined : ((value.savedPlaylists as Array).map(SearchPlaylistToJSON)), + 'albums': ((value.albums as Array).map(SearchPlaylistToJSON)), + 'saved_albums': value.savedAlbums === undefined ? undefined : ((value.savedAlbums as Array).map(SearchPlaylistToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylist.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylist.ts new file mode 100644 index 00000000000..ae834b7a6ab --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylist.ts @@ -0,0 +1,450 @@ +/* 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 { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface SearchPlaylist + */ +export interface SearchPlaylist { + /** + * + * @type {PlaylistArtwork} + * @memberof SearchPlaylist + */ + artwork?: PlaylistArtwork; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + description?: string; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + permalink: string; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + id: string; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof SearchPlaylist + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof SearchPlaylist + */ + repostCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylist + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylist + */ + totalPlayCount: number; + /** + * + * @type {User} + * @memberof SearchPlaylist + */ + user: User; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof SearchPlaylist + */ + access: Access; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + upc?: string; + /** + * + * @type {number} + * @memberof SearchPlaylist + */ + trackCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylist + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof SearchPlaylist + */ + followeeReposts?: Array; + /** + * + * @type {Array} + * @memberof SearchPlaylist + */ + followeeFavorites?: Array; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof SearchPlaylist + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + userId: string; + /** + * + * @type {Array} + * @memberof SearchPlaylist + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof SearchPlaylist + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof SearchPlaylist + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof SearchPlaylist + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof SearchPlaylist + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof SearchPlaylist + */ + artists?: Array; + /** + * + * @type {object} + * @memberof SearchPlaylist + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof SearchPlaylist + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof SearchPlaylist + */ + parentalWarningType?: string | null; +} + +/** + * Check if a given object implements the SearchPlaylist interface. + */ +export function instanceOfSearchPlaylist(value: object): value is SearchPlaylist { + 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 SearchPlaylistFromJSON(json: any): SearchPlaylist { + return SearchPlaylistFromJSONTyped(json, false); +} + +export function SearchPlaylistFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchPlaylist { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : PlaylistArtworkFromJSON(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': UserFromJSON(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(TrackFromJSON)), + '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 SearchPlaylistToJSON(value?: SearchPlaylist | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': PlaylistArtworkToJSON(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': UserToJSON(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(TrackToJSON)), + '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/SearchResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchResponse.ts new file mode 100644 index 00000000000..2b6eb7b09bc --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchResponse.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 SearchResponse + */ +export interface SearchResponse { + /** + * + * @type {number} + * @memberof SearchResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof SearchResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof SearchResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof SearchResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof SearchResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof SearchResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof SearchResponse + */ + version: VersionMetadata; + /** + * + * @type {SearchModel} + * @memberof SearchResponse + */ + data?: SearchModel; +} + +/** + * Check if a given object implements the SearchResponse interface. + */ +export function instanceOfSearchResponse(value: object): value is SearchResponse { + 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 SearchResponseFromJSON(json: any): SearchResponse { + return SearchResponseFromJSONTyped(json, false); +} + +export function SearchResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchResponse { + 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 SearchResponseToJSON(value?: SearchResponse | 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/SearchTrack.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchTrack.ts new file mode 100644 index 00000000000..8d65b05d319 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchTrack.ts @@ -0,0 +1,830 @@ +/* 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 { DdexCopyright } from './DdexCopyright'; +import { + DdexCopyrightFromJSON, + DdexCopyrightFromJSONTyped, + DdexCopyrightToJSON, +} from './DdexCopyright'; +import type { DdexResourceContributor } from './DdexResourceContributor'; +import { + DdexResourceContributorFromJSON, + DdexResourceContributorFromJSONTyped, + DdexResourceContributorToJSON, +} from './DdexResourceContributor'; +import type { DdexRightsController } from './DdexRightsController'; +import { + DdexRightsControllerFromJSON, + DdexRightsControllerFromJSONTyped, + DdexRightsControllerToJSON, +} from './DdexRightsController'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; +import type { RemixParent } from './RemixParent'; +import { + RemixParentFromJSON, + RemixParentFromJSONTyped, + RemixParentToJSON, +} from './RemixParent'; +import type { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { StemParent } from './StemParent'; +import { + StemParentFromJSON, + StemParentFromJSONTyped, + StemParentToJSON, +} from './StemParent'; +import type { TrackArtwork } from './TrackArtwork'; +import { + TrackArtworkFromJSON, + TrackArtworkFromJSONTyped, + TrackArtworkToJSON, +} from './TrackArtwork'; +import type { TrackSegment } from './TrackSegment'; +import { + TrackSegmentFromJSON, + TrackSegmentFromJSONTyped, + TrackSegmentToJSON, +} from './TrackSegment'; +import type { UrlWithMirrors } from './UrlWithMirrors'; +import { + UrlWithMirrorsFromJSON, + UrlWithMirrorsFromJSONTyped, + UrlWithMirrorsToJSON, +} from './UrlWithMirrors'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface SearchTrack + */ +export interface SearchTrack { + /** + * + * @type {TrackArtwork} + * @memberof SearchTrack + */ + artwork: TrackArtwork; + /** + * + * @type {string} + * @memberof SearchTrack + */ + description?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + genre: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + id: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + trackCid?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + previewCid?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + origFileCid?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + origFilename?: string; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isOriginalAvailable: boolean; + /** + * + * @type {string} + * @memberof SearchTrack + */ + mood?: string; + /** + * + * @type {Date} + * @memberof SearchTrack + */ + releaseDate?: Date; + /** + * + * @type {RemixParent} + * @memberof SearchTrack + */ + remixOf: RemixParent; + /** + * + * @type {number} + * @memberof SearchTrack + */ + repostCount: number; + /** + * + * @type {number} + * @memberof SearchTrack + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof SearchTrack + */ + commentCount: number; + /** + * + * @type {string} + * @memberof SearchTrack + */ + tags?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + title: string; + /** + * + * @type {User} + * @memberof SearchTrack + */ + user: User; + /** + * + * @type {number} + * @memberof SearchTrack + */ + duration: number; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isDownloadable: boolean; + /** + * + * @type {number} + * @memberof SearchTrack + */ + playCount: number; + /** + * + * @type {string} + * @memberof SearchTrack + */ + permalink: string; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isStreamable?: boolean; + /** + * + * @type {string} + * @memberof SearchTrack + */ + ddexApp?: string; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + playlistsContainingTrack?: Array; + /** + * + * @type {number} + * @memberof SearchTrack + */ + pinnedCommentId?: number; + /** + * + * @type {AlbumBacklink} + * @memberof SearchTrack + */ + albumBacklink?: AlbumBacklink; + /** + * Describes what access the given user has + * @type {Access} + * @memberof SearchTrack + */ + access: Access; + /** + * The blocknumber this track was last updated + * @type {number} + * @memberof SearchTrack + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof SearchTrack + */ + createDate?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + coverArtSizes: string; + /** + * + * @type {CoverArt} + * @memberof SearchTrack + */ + coverArtCids?: CoverArt; + /** + * + * @type {string} + * @memberof SearchTrack + */ + createdAt: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + creditsSplits?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + isrc?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + license?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + iswc?: string; + /** + * + * @type {FieldVisibility} + * @memberof SearchTrack + */ + fieldVisibility: FieldVisibility; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + followeeReposts?: Array; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isScheduledRelease: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isUnlisted: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + followeeFavorites?: Array; + /** + * + * @type {string} + * @memberof SearchTrack + */ + routeId: string; + /** + * + * @type {StemParent} + * @memberof SearchTrack + */ + stemOf?: StemParent; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + trackSegments: Array; + /** + * + * @type {string} + * @memberof SearchTrack + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + userId: string; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isDelete: boolean; + /** + * + * @type {string} + * @memberof SearchTrack + */ + coverArt?: string; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isAvailable: boolean; + /** + * + * @type {number} + * @memberof SearchTrack + */ + aiAttributionUserId?: number; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + allowedApiKeys?: Array; + /** + * + * @type {string} + * @memberof SearchTrack + */ + audioUploadId?: string; + /** + * + * @type {number} + * @memberof SearchTrack + */ + previewStartSeconds?: number; + /** + * + * @type {number} + * @memberof SearchTrack + */ + bpm?: number; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isCustomBpm?: boolean; + /** + * + * @type {string} + * @memberof SearchTrack + */ + musicalKey?: string; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + isCustomMusicalKey?: boolean; + /** + * + * @type {number} + * @memberof SearchTrack + */ + audioAnalysisErrorCount?: number; + /** + * + * @type {boolean} + * @memberof SearchTrack + */ + commentsDisabled?: boolean; + /** + * + * @type {object} + * @memberof SearchTrack + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + artists?: Array; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + resourceContributors?: Array | null; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + indirectResourceContributors?: Array | null; + /** + * + * @type {DdexRightsController} + * @memberof SearchTrack + */ + rightsController?: DdexRightsController; + /** + * + * @type {DdexCopyright} + * @memberof SearchTrack + */ + copyrightLine?: DdexCopyright | null; + /** + * + * @type {DdexCopyright} + * @memberof SearchTrack + */ + producerCopyrightLine?: DdexCopyright | null; + /** + * + * @type {string} + * @memberof SearchTrack + */ + parentalWarningType?: string | null; + /** + * Whether or not the owner has restricted streaming behind an access gate + * @type {boolean} + * @memberof SearchTrack + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof SearchTrack + */ + streamConditions?: AccessGate; + /** + * Whether or not the owner has restricted downloading behind an access gate + * @type {boolean} + * @memberof SearchTrack + */ + isDownloadGated: boolean; + /** + * How to unlock the track download + * @type {AccessGate} + * @memberof SearchTrack + */ + downloadConditions?: AccessGate; + /** + * + * @type {string} + * @memberof SearchTrack + */ + coverOriginalSongTitle?: string; + /** + * + * @type {string} + * @memberof SearchTrack + */ + coverOriginalArtist?: string; + /** + * Indicates whether the track is owned by the user for MRI sake + * @type {boolean} + * @memberof SearchTrack + */ + isOwnedByUser: boolean; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrack + */ + stream: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrack + */ + download: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrack + */ + preview: UrlWithMirrors; +} + +/** + * Check if a given object implements the SearchTrack interface. + */ +export function instanceOfSearchTrack(value: object): value is SearchTrack { + 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 SearchTrackFromJSON(json: any): SearchTrack { + return SearchTrackFromJSONTyped(json, false); +} + +export function SearchTrackFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchTrack { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': TrackArtworkFromJSON(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 : (new Date(json['release_date'])), + 'remixOf': RemixParentFromJSON(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': UserFromJSON(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'] === null ? null : (json['resource_contributors'] as Array).map(DdexResourceContributorFromJSON)), + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : (json['indirect_resource_contributors'] === null ? null : (json['indirect_resource_contributors'] as Array).map(DdexResourceContributorFromJSON)), + 'rightsController': !exists(json, 'rights_controller') ? undefined : DdexRightsControllerFromJSON(json['rights_controller']), + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : DdexCopyrightFromJSON(json['copyright_line']), + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : DdexCopyrightFromJSON(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 SearchTrackToJSON(value?: SearchTrack | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': TrackArtworkToJSON(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 === undefined ? undefined : (value.releaseDate.toISOString().substr(0,10)), + 'remix_of': RemixParentToJSON(value.remixOf), + 'repost_count': value.repostCount, + 'favorite_count': value.favoriteCount, + 'comment_count': value.commentCount, + 'tags': value.tags, + 'title': value.title, + 'user': UserToJSON(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 === undefined ? undefined : (value.resourceContributors === null ? null : (value.resourceContributors as Array).map(DdexResourceContributorToJSON)), + 'indirect_resource_contributors': value.indirectResourceContributors === undefined ? undefined : (value.indirectResourceContributors === null ? null : (value.indirectResourceContributors as Array).map(DdexResourceContributorToJSON)), + 'rights_controller': DdexRightsControllerToJSON(value.rightsController), + 'copyright_line': DdexCopyrightToJSON(value.copyrightLine), + 'producer_copyright_line': DdexCopyrightToJSON(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/StemCategory.ts b/packages/sdk/src/sdk/api/generated/default/models/StemCategory.ts deleted file mode 100644 index 22c02baf21a..00000000000 --- a/packages/sdk/src/sdk/api/generated/default/models/StemCategory.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* 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. - */ - - -/** - * - * @export - */ -export const StemCategory = { - Instrumental: 'INSTRUMENTAL', - LeadVocals: 'LEAD_VOCALS', - MelodicLead: 'MELODIC_LEAD', - Pad: 'PAD', - Snare: 'SNARE', - Kick: 'KICK', - Hihat: 'HIHAT', - Percussion: 'PERCUSSION', - Sample: 'SAMPLE', - BackingVox: 'BACKING_VOX', - Bass: 'BASS', - Other: 'OTHER' -} as const; -export type StemCategory = typeof StemCategory[keyof typeof StemCategory]; - - -export function StemCategoryFromJSON(json: any): StemCategory { - return StemCategoryFromJSONTyped(json, false); -} - -export function StemCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): StemCategory { - return json as StemCategory; -} - -export function StemCategoryToJSON(value?: StemCategory | null): any { - return value as any; -} - diff --git a/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts b/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts index 7a27fca93f6..826d89b6b26 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts @@ -14,13 +14,6 @@ */ import { exists, mapValues } from '../runtime'; -import type { StemCategory } from './StemCategory'; -import { - StemCategoryFromJSON, - StemCategoryFromJSONTyped, - StemCategoryToJSON, -} from './StemCategory'; - /** * * @export @@ -29,16 +22,16 @@ import { export interface StemParent { /** * - * @type {StemCategory} + * @type {string} * @memberof StemParent */ - category: StemCategory; + category: string; /** * - * @type {string} + * @type {number} * @memberof StemParent */ - parentTrackId: string; + parentTrackId: number; } /** @@ -62,7 +55,7 @@ export function StemParentFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'category': StemCategoryFromJSON(json['category']), + 'category': json['category'], 'parentTrackId': json['parent_track_id'], }; } @@ -76,7 +69,7 @@ export function StemParentToJSON(value?: StemParent | null): any { } return { - 'category': StemCategoryToJSON(value.category), + 'category': value.category, 'parent_track_id': value.parentTrackId, }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/StemsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/StemsResponse.ts index 9a7658c0806..d4482e251fb 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/StemsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/StemsResponse.ts @@ -20,6 +20,12 @@ import { StemFromJSONTyped, StemToJSON, } from './Stem'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface StemsResponse */ export interface StemsResponse { + /** + * + * @type {number} + * @memberof StemsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof StemsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof StemsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof StemsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof StemsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof StemsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof StemsResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface StemsResponse { */ export function instanceOfStemsResponse(value: object): value is StemsResponse { 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; } @@ -54,6 +109,13 @@ export function StemsResponseFromJSONTyped(json: any, ignoreDiscriminator: boole } 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(StemFromJSON)), }; } @@ -67,6 +129,13 @@ export function StemsResponseToJSON(value?: StemsResponse | null): any { } 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(StemToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/SubscribersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/SubscribersResponse.ts index 9b27124fcdb..21b775ab505 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/SubscribersResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/SubscribersResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface SubscribersResponse */ export interface SubscribersResponse { + /** + * + * @type {number} + * @memberof SubscribersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof SubscribersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof SubscribersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof SubscribersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof SubscribersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof SubscribersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof SubscribersResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface SubscribersResponse { */ export function instanceOfSubscribersResponse(value: object): value is SubscribersResponse { 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; } @@ -54,6 +109,13 @@ export function SubscribersResponseFromJSONTyped(json: any, ignoreDiscriminator: } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function SubscribersResponseToJSON(value?: SubscribersResponse | null): a } 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(UserToJSON)), }; } 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/SupporterReference.ts b/packages/sdk/src/sdk/api/generated/default/models/SupporterReference.ts new file mode 100644 index 00000000000..f0bc101179a --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SupporterReference.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 SupporterReference + */ +export interface SupporterReference { + /** + * + * @type {string} + * @memberof SupporterReference + */ + userId: string; +} + +/** + * Check if a given object implements the SupporterReference interface. + */ +export function instanceOfSupporterReference(value: object): value is SupporterReference { + let isInstance = true; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + + return isInstance; +} + +export function SupporterReferenceFromJSON(json: any): SupporterReference { + return SupporterReferenceFromJSONTyped(json, false); +} + +export function SupporterReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterReference { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': json['user_id'], + }; +} + +export function SupporterReferenceToJSON(value?: SupporterReference | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user_id': value.userId, + }; +} + 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/Tip.ts b/packages/sdk/src/sdk/api/generated/default/models/Tip.ts index 8e9ee08737e..3eb0b8de8a5 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Tip.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Tip.ts @@ -14,6 +14,12 @@ */ import { exists, mapValues } from '../runtime'; +import type { SupporterReference } from './SupporterReference'; +import { + SupporterReferenceFromJSON, + SupporterReferenceFromJSONTyped, + SupporterReferenceToJSON, +} from './SupporterReference'; import type { User } from './User'; import { UserFromJSON, @@ -38,19 +44,37 @@ export interface Tip { * @type {User} * @memberof Tip */ - sender?: User; + sender: User; /** * * @type {User} * @memberof Tip */ - receiver?: User; + receiver: User; /** * * @type {string} * @memberof Tip */ createdAt: string; + /** + * + * @type {number} + * @memberof Tip + */ + slot: number; + /** + * + * @type {Array} + * @memberof Tip + */ + followeeSupporters: Array; + /** + * + * @type {string} + * @memberof Tip + */ + txSignature: string; } /** @@ -59,7 +83,12 @@ export interface Tip { export function instanceOfTip(value: object): value is Tip { let isInstance = true; isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "sender" in value && value["sender"] !== undefined; + isInstance = isInstance && "receiver" in value && value["receiver"] !== undefined; isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "slot" in value && value["slot"] !== undefined; + isInstance = isInstance && "followeeSupporters" in value && value["followeeSupporters"] !== undefined; + isInstance = isInstance && "txSignature" in value && value["txSignature"] !== undefined; return isInstance; } @@ -75,9 +104,12 @@ export function TipFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tip { return { 'amount': json['amount'], - 'sender': !exists(json, 'sender') ? undefined : UserFromJSON(json['sender']), - 'receiver': !exists(json, 'receiver') ? undefined : UserFromJSON(json['receiver']), + 'sender': UserFromJSON(json['sender']), + 'receiver': UserFromJSON(json['receiver']), 'createdAt': json['created_at'], + 'slot': json['slot'], + 'followeeSupporters': ((json['followee_supporters'] as Array).map(SupporterReferenceFromJSON)), + 'txSignature': json['tx_signature'], }; } @@ -94,6 +126,9 @@ export function TipToJSON(value?: Tip | null): any { 'sender': UserToJSON(value.sender), 'receiver': UserToJSON(value.receiver), 'created_at': value.createdAt, + 'slot': value.slot, + 'followee_supporters': ((value.followeeSupporters as Array).map(SupporterReferenceToJSON)), + 'tx_signature': value.txSignature, }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/TopGenreUsersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TopGenreUsersResponse.ts new file mode 100644 index 00000000000..27df0428e00 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TopGenreUsersResponse.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 { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TopGenreUsersResponse + */ +export interface TopGenreUsersResponse { + /** + * + * @type {number} + * @memberof TopGenreUsersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TopGenreUsersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TopGenreUsersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TopGenreUsersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TopGenreUsersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TopGenreUsersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TopGenreUsersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TopGenreUsersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the TopGenreUsersResponse interface. + */ +export function instanceOfTopGenreUsersResponse(value: object): value is TopGenreUsersResponse { + 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 TopGenreUsersResponseFromJSON(json: any): TopGenreUsersResponse { + return TopGenreUsersResponseFromJSONTyped(json, false); +} + +export function TopGenreUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopGenreUsersResponse { + 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(UserFromJSON)), + }; +} + +export function TopGenreUsersResponseToJSON(value?: TopGenreUsersResponse | 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(UserToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponse.ts new file mode 100644 index 00000000000..9245de28018 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponse.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 { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TopUsersResponse + */ +export interface TopUsersResponse { + /** + * + * @type {number} + * @memberof TopUsersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TopUsersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TopUsersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TopUsersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TopUsersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TopUsersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TopUsersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TopUsersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the TopUsersResponse interface. + */ +export function instanceOfTopUsersResponse(value: object): value is TopUsersResponse { + 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 TopUsersResponseFromJSON(json: any): TopUsersResponse { + return TopUsersResponseFromJSONTyped(json, false); +} + +export function TopUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopUsersResponse { + 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(UserFromJSON)), + }; +} + +export function TopUsersResponseToJSON(value?: TopUsersResponse | 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(UserToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Track.ts b/packages/sdk/src/sdk/api/generated/default/models/Track.ts index 4181f9359eb..dc2e8f52c95 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Track.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Track.ts @@ -14,6 +14,12 @@ */ import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; import type { AccessGate } from './AccessGate'; import { AccessGateFromJSON, @@ -26,30 +32,78 @@ import { AlbumBacklinkFromJSONTyped, AlbumBacklinkToJSON, } from './AlbumBacklink'; -import type { MediaLink } from './MediaLink'; +import type { CoverArt } from './CoverArt'; +import { + CoverArtFromJSON, + CoverArtFromJSONTyped, + CoverArtToJSON, +} from './CoverArt'; +import type { DdexCopyright } from './DdexCopyright'; +import { + DdexCopyrightFromJSON, + DdexCopyrightFromJSONTyped, + DdexCopyrightToJSON, +} from './DdexCopyright'; +import type { DdexResourceContributor } from './DdexResourceContributor'; +import { + DdexResourceContributorFromJSON, + DdexResourceContributorFromJSONTyped, + DdexResourceContributorToJSON, +} from './DdexResourceContributor'; +import type { DdexRightsController } from './DdexRightsController'; import { - MediaLinkFromJSON, - MediaLinkFromJSONTyped, - MediaLinkToJSON, -} from './MediaLink'; + DdexRightsControllerFromJSON, + DdexRightsControllerFromJSONTyped, + DdexRightsControllerToJSON, +} from './DdexRightsController'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; import type { RemixParent } from './RemixParent'; import { RemixParentFromJSON, RemixParentFromJSONTyped, RemixParentToJSON, } from './RemixParent'; -import type { TrackAccessInfo } from './TrackAccessInfo'; +import type { Repost } from './Repost'; +import { + RepostFromJSON, + RepostFromJSONTyped, + RepostToJSON, +} from './Repost'; +import type { StemParent } from './StemParent'; import { - TrackAccessInfoFromJSON, - TrackAccessInfoFromJSONTyped, - TrackAccessInfoToJSON, -} from './TrackAccessInfo'; + StemParentFromJSON, + StemParentFromJSONTyped, + StemParentToJSON, +} from './StemParent'; import type { TrackArtwork } from './TrackArtwork'; import { TrackArtworkFromJSON, TrackArtworkFromJSONTyped, TrackArtworkToJSON, } from './TrackArtwork'; +import type { TrackSegment } from './TrackSegment'; +import { + TrackSegmentFromJSON, + TrackSegmentFromJSONTyped, + TrackSegmentToJSON, +} from './TrackSegment'; +import type { UrlWithMirrors } from './UrlWithMirrors'; +import { + UrlWithMirrorsFromJSON, + UrlWithMirrorsFromJSONTyped, + UrlWithMirrorsToJSON, +} from './UrlWithMirrors'; import type { User } from './User'; import { UserFromJSON, @@ -129,18 +183,12 @@ export interface Track { * @memberof Track */ releaseDate?: Date; - /** - * - * @type {string} - * @memberof Track - */ - isrc?: string; /** * * @type {RemixParent} * @memberof Track */ - remixOf?: RemixParent; + remixOf: RemixParent; /** * * @type {number} @@ -232,317 +280,323 @@ export interface Track { */ albumBacklink?: AlbumBacklink; /** - * - * @type {TrackAccessInfo} + * Describes what access the given user has + * @type {Access} * @memberof Track */ - access?: TrackAccessInfo; + access: Access; + /** + * The blocknumber this track was last updated + * @type {number} + * @memberof Track + */ + blocknumber: number; /** * * @type {string} * @memberof Track */ - aiAttributionUserId?: string; + createDate?: string; /** * - * @type {Array} + * @type {string} * @memberof Track */ - allowedApiKeys?: Array; + coverArtSizes: string; /** * - * @type {object} + * @type {CoverArt} * @memberof Track */ - artists?: object; + coverArtCids?: CoverArt; /** * - * @type {number} + * @type {string} * @memberof Track */ - audioAnalysisErrorCount?: number; + createdAt: string; /** * * @type {string} * @memberof Track */ - audioUploadId?: string; + creditsSplits?: string; /** * - * @type {number} + * @type {string} * @memberof Track */ - blocknumber?: number; + isrc?: string; /** * - * @type {number} + * @type {string} * @memberof Track */ - bpm?: number; + license?: string; /** * - * @type {boolean} + * @type {string} * @memberof Track */ - commentsDisabled?: boolean; + iswc?: string; /** * - * @type {object} + * @type {FieldVisibility} * @memberof Track */ - copyrightLine?: object; + fieldVisibility: FieldVisibility; /** * - * @type {string} + * @type {Array} * @memberof Track */ - coverArt?: string; + followeeReposts: Array; /** * - * @type {string} + * @type {boolean} * @memberof Track */ - coverArtSizes?: string; + hasCurrentUserReposted: boolean; /** * - * @type {string} + * @type {boolean} * @memberof Track */ - coverOriginalArtist?: string; + isScheduledRelease: boolean; /** * - * @type {string} + * @type {boolean} * @memberof Track */ - coverOriginalSongTitle?: string; + isUnlisted: boolean; /** * - * @type {string} + * @type {boolean} * @memberof Track */ - createDate?: string; + hasCurrentUserSaved: boolean; /** * - * @type {Date} + * @type {Array} * @memberof Track */ - createdAt?: Date; + followeeFavorites: Array; /** * * @type {string} * @memberof Track */ - creditsSplits?: string; + routeId: string; /** * - * @type {object} + * @type {StemParent} * @memberof Track */ - ddexReleaseIds?: object; + stemOf?: StemParent; /** * - * @type {MediaLink} + * @type {Array} * @memberof Track */ - download?: MediaLink; + trackSegments: Array; /** * - * @type {AccessGate} + * @type {string} * @memberof Track */ - downloadConditions?: AccessGate; + updatedAt: string; /** * - * @type {object} + * @type {string} * @memberof Track */ - fieldVisibility?: object; + userId: string; /** * - * @type {Array} + * @type {boolean} * @memberof Track */ - followeeFavorites?: Array; + isDelete: boolean; /** * - * @type {Array} + * @type {string} * @memberof Track */ - followeeReposts?: Array; + coverArt?: string; /** * * @type {boolean} * @memberof Track */ - hasCurrentUserReposted?: boolean; + isAvailable: boolean; /** * - * @type {boolean} + * @type {number} * @memberof Track */ - hasCurrentUserSaved?: boolean; + aiAttributionUserId?: number; /** * - * @type {object} + * @type {Array} * @memberof Track */ - indirectResourceContributors?: object; + allowedApiKeys?: Array; /** * - * @type {boolean} + * @type {string} * @memberof Track */ - isAvailable?: boolean; + audioUploadId?: string; /** * - * @type {boolean} + * @type {number} * @memberof Track */ - isCustomBpm?: boolean; + previewStartSeconds?: number; /** * - * @type {boolean} + * @type {number} * @memberof Track */ - isCustomMusicalKey?: boolean; + bpm?: number; /** * * @type {boolean} * @memberof Track */ - isDelete?: boolean; + isCustomBpm?: boolean; /** * - * @type {boolean} + * @type {string} * @memberof Track */ - isDownloadGated?: boolean; + musicalKey?: string; /** * * @type {boolean} * @memberof Track */ - isOwnedByUser?: boolean; + isCustomMusicalKey?: boolean; /** * - * @type {boolean} + * @type {number} * @memberof Track */ - isScheduledRelease?: boolean; + audioAnalysisErrorCount?: number; /** * * @type {boolean} * @memberof Track */ - isStreamGated?: boolean; + commentsDisabled?: boolean; /** * - * @type {boolean} + * @type {object} * @memberof Track */ - isUnlisted?: boolean; + ddexReleaseIds?: object; /** * - * @type {string} + * @type {Array} * @memberof Track */ - iswc?: string; + artists?: Array; /** * - * @type {string} + * @type {Array} * @memberof Track */ - license?: string; + resourceContributors?: Array | null; /** * - * @type {string} + * @type {Array} * @memberof Track */ - musicalKey?: string; + indirectResourceContributors?: Array | null; /** * - * @type {string} + * @type {DdexRightsController} * @memberof Track */ - parentalWarningType?: string | null; + rightsController?: DdexRightsController; /** * - * @type {object} + * @type {DdexCopyright} * @memberof Track */ - playlistsPreviouslyContainingTrack?: object; + copyrightLine?: DdexCopyright | null; /** * - * @type {MediaLink} + * @type {DdexCopyright} * @memberof Track */ - preview?: MediaLink; + producerCopyrightLine?: DdexCopyright | null; /** * - * @type {number} + * @type {string} * @memberof Track */ - previewStartSeconds?: number; + parentalWarningType?: string | null; /** - * - * @type {object} + * Whether or not the owner has restricted streaming behind an access gate + * @type {boolean} * @memberof Track */ - producerCopyrightLine?: object; + isStreamGated: boolean; /** - * - * @type {object} + * How to unlock stream access to the track + * @type {AccessGate} * @memberof Track */ - resourceContributors?: object; + streamConditions?: AccessGate; /** - * - * @type {object} + * Whether or not the owner has restricted downloading behind an access gate + * @type {boolean} * @memberof Track */ - rightsController?: object; + isDownloadGated: boolean; /** - * - * @type {string} + * How to unlock the track download + * @type {AccessGate} * @memberof Track */ - slug?: string; + downloadConditions?: AccessGate; /** * - * @type {Array} + * @type {string} * @memberof Track */ - stemOf?: Array; + coverOriginalSongTitle?: string; /** * - * @type {MediaLink} + * @type {string} * @memberof Track */ - stream?: MediaLink; + coverOriginalArtist?: string; /** - * - * @type {AccessGate} + * Indicates whether the track is owned by the user for MRI sake + * @type {boolean} * @memberof Track */ - streamConditions?: AccessGate; + isOwnedByUser: boolean; /** * - * @type {number} + * @type {UrlWithMirrors} * @memberof Track */ - trackId?: number; + stream: UrlWithMirrors; /** * - * @type {object} + * @type {UrlWithMirrors} * @memberof Track */ - trackSegments?: object; + download: UrlWithMirrors; /** * - * @type {Date} + * @type {UrlWithMirrors} * @memberof Track */ - updatedAt?: Date; + preview: UrlWithMirrors; } /** @@ -554,6 +608,7 @@ export function instanceOfTrack(value: object): value is Track { 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; @@ -563,6 +618,29 @@ export function instanceOfTrack(value: object): value is Track { 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; } @@ -588,8 +666,7 @@ export function TrackFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra 'isOriginalAvailable': json['is_original_available'], 'mood': !exists(json, 'mood') ? undefined : json['mood'], 'releaseDate': !exists(json, 'release_date') ? undefined : (new Date(json['release_date'])), - 'isrc': !exists(json, 'isrc') ? undefined : json['isrc'], - 'remixOf': !exists(json, 'remix_of') ? undefined : RemixParentFromJSON(json['remix_of']), + 'remixOf': RemixParentFromJSON(json['remix_of']), 'repostCount': json['repost_count'], 'favoriteCount': json['favorite_count'], 'commentCount': json['comment_count'], @@ -605,58 +682,59 @@ export function TrackFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra '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': !exists(json, 'access') ? undefined : TrackAccessInfoFromJSON(json['access']), + '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'], - 'artists': !exists(json, 'artists') ? undefined : json['artists'], - 'audioAnalysisErrorCount': !exists(json, 'audio_analysis_error_count') ? undefined : json['audio_analysis_error_count'], 'audioUploadId': !exists(json, 'audio_upload_id') ? undefined : json['audio_upload_id'], - 'blocknumber': !exists(json, 'blocknumber') ? undefined : json['blocknumber'], + 'previewStartSeconds': !exists(json, 'preview_start_seconds') ? undefined : json['preview_start_seconds'], 'bpm': !exists(json, 'bpm') ? undefined : json['bpm'], - 'commentsDisabled': !exists(json, 'comments_disabled') ? undefined : json['comments_disabled'], - 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], - 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], - 'coverArtSizes': !exists(json, 'cover_art_sizes') ? undefined : json['cover_art_sizes'], - 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], - 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], - 'createDate': !exists(json, 'create_date') ? undefined : json['create_date'], - 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), - 'creditsSplits': !exists(json, 'credits_splits') ? undefined : json['credits_splits'], - 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], - 'download': !exists(json, 'download') ? undefined : MediaLinkFromJSON(json['download']), - 'downloadConditions': !exists(json, 'download_conditions') ? undefined : AccessGateFromJSON(json['download_conditions']), - 'fieldVisibility': !exists(json, 'field_visibility') ? undefined : json['field_visibility'], - 'followeeFavorites': !exists(json, 'followee_favorites') ? undefined : json['followee_favorites'], - 'followeeReposts': !exists(json, 'followee_reposts') ? undefined : json['followee_reposts'], - 'hasCurrentUserReposted': !exists(json, 'has_current_user_reposted') ? undefined : json['has_current_user_reposted'], - 'hasCurrentUserSaved': !exists(json, 'has_current_user_saved') ? undefined : json['has_current_user_saved'], - 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : json['indirect_resource_contributors'], - 'isAvailable': !exists(json, 'is_available') ? undefined : json['is_available'], 'isCustomBpm': !exists(json, 'is_custom_bpm') ? undefined : json['is_custom_bpm'], - 'isCustomMusicalKey': !exists(json, 'is_custom_musical_key') ? undefined : json['is_custom_musical_key'], - 'isDelete': !exists(json, 'is_delete') ? undefined : json['is_delete'], - 'isDownloadGated': !exists(json, 'is_download_gated') ? undefined : json['is_download_gated'], - 'isOwnedByUser': !exists(json, 'is_owned_by_user') ? undefined : json['is_owned_by_user'], - 'isScheduledRelease': !exists(json, 'is_scheduled_release') ? undefined : json['is_scheduled_release'], - 'isStreamGated': !exists(json, 'is_stream_gated') ? undefined : json['is_stream_gated'], - 'isUnlisted': !exists(json, 'is_unlisted') ? undefined : json['is_unlisted'], - 'iswc': !exists(json, 'iswc') ? undefined : json['iswc'], - 'license': !exists(json, 'license') ? undefined : json['license'], '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'] === null ? null : (json['resource_contributors'] as Array).map(DdexResourceContributorFromJSON)), + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : (json['indirect_resource_contributors'] === null ? null : (json['indirect_resource_contributors'] as Array).map(DdexResourceContributorFromJSON)), + 'rightsController': !exists(json, 'rights_controller') ? undefined : DdexRightsControllerFromJSON(json['rights_controller']), + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : DdexCopyrightFromJSON(json['copyright_line']), + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : DdexCopyrightFromJSON(json['producer_copyright_line']), 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], - 'playlistsPreviouslyContainingTrack': !exists(json, 'playlists_previously_containing_track') ? undefined : json['playlists_previously_containing_track'], - 'preview': !exists(json, 'preview') ? undefined : MediaLinkFromJSON(json['preview']), - 'previewStartSeconds': !exists(json, 'preview_start_seconds') ? undefined : json['preview_start_seconds'], - 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], - 'resourceContributors': !exists(json, 'resource_contributors') ? undefined : json['resource_contributors'], - 'rightsController': !exists(json, 'rights_controller') ? undefined : json['rights_controller'], - 'slug': !exists(json, 'slug') ? undefined : json['slug'], - 'stemOf': !exists(json, 'stem_of') ? undefined : json['stem_of'], - 'stream': !exists(json, 'stream') ? undefined : MediaLinkFromJSON(json['stream']), + 'isStreamGated': json['is_stream_gated'], 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), - 'trackId': !exists(json, 'track_id') ? undefined : json['track_id'], - 'trackSegments': !exists(json, 'track_segments') ? undefined : json['track_segments'], - 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), + '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']), }; } @@ -680,7 +758,6 @@ export function TrackToJSON(value?: Track | null): any { 'is_original_available': value.isOriginalAvailable, 'mood': value.mood, 'release_date': value.releaseDate === undefined ? undefined : (value.releaseDate.toISOString().substr(0,10)), - 'isrc': value.isrc, 'remix_of': RemixParentToJSON(value.remixOf), 'repost_count': value.repostCount, 'favorite_count': value.favoriteCount, @@ -697,58 +774,59 @@ export function TrackToJSON(value?: Track | null): any { 'playlists_containing_track': value.playlistsContainingTrack, 'pinned_comment_id': value.pinnedCommentId, 'album_backlink': AlbumBacklinkToJSON(value.albumBacklink), - 'access': TrackAccessInfoToJSON(value.access), - 'ai_attribution_user_id': value.aiAttributionUserId, - 'allowed_api_keys': value.allowedApiKeys, - 'artists': value.artists, - 'audio_analysis_error_count': value.audioAnalysisErrorCount, - 'audio_upload_id': value.audioUploadId, + 'access': AccessToJSON(value.access), 'blocknumber': value.blocknumber, - 'bpm': value.bpm, - 'comments_disabled': value.commentsDisabled, - 'copyright_line': value.copyrightLine, - 'cover_art': value.coverArt, - 'cover_art_sizes': value.coverArtSizes, - 'cover_original_artist': value.coverOriginalArtist, - 'cover_original_song_title': value.coverOriginalSongTitle, 'create_date': value.createDate, - 'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()), + 'cover_art_sizes': value.coverArtSizes, + 'cover_art_cids': CoverArtToJSON(value.coverArtCids), + 'created_at': value.createdAt, 'credits_splits': value.creditsSplits, - 'ddex_release_ids': value.ddexReleaseIds, - 'download': MediaLinkToJSON(value.download), - 'download_conditions': AccessGateToJSON(value.downloadConditions), - 'field_visibility': value.fieldVisibility, - 'followee_favorites': value.followeeFavorites, - 'followee_reposts': value.followeeReposts, + '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, - 'indirect_resource_contributors': value.indirectResourceContributors, + '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, - 'is_custom_musical_key': value.isCustomMusicalKey, - 'is_delete': value.isDelete, - 'is_download_gated': value.isDownloadGated, - 'is_owned_by_user': value.isOwnedByUser, - 'is_scheduled_release': value.isScheduledRelease, - 'is_stream_gated': value.isStreamGated, - 'is_unlisted': value.isUnlisted, - 'iswc': value.iswc, - 'license': value.license, '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 === undefined ? undefined : (value.resourceContributors === null ? null : (value.resourceContributors as Array).map(DdexResourceContributorToJSON)), + 'indirect_resource_contributors': value.indirectResourceContributors === undefined ? undefined : (value.indirectResourceContributors === null ? null : (value.indirectResourceContributors as Array).map(DdexResourceContributorToJSON)), + 'rights_controller': DdexRightsControllerToJSON(value.rightsController), + 'copyright_line': DdexCopyrightToJSON(value.copyrightLine), + 'producer_copyright_line': DdexCopyrightToJSON(value.producerCopyrightLine), 'parental_warning_type': value.parentalWarningType, - 'playlists_previously_containing_track': value.playlistsPreviouslyContainingTrack, - 'preview': MediaLinkToJSON(value.preview), - 'preview_start_seconds': value.previewStartSeconds, - 'producer_copyright_line': value.producerCopyrightLine, - 'resource_contributors': value.resourceContributors, - 'rights_controller': value.rightsController, - 'slug': value.slug, - 'stem_of': value.stemOf, - 'stream': MediaLinkToJSON(value.stream), + 'is_stream_gated': value.isStreamGated, 'stream_conditions': AccessGateToJSON(value.streamConditions), - 'track_id': value.trackId, - 'track_segments': value.trackSegments, - 'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()), + '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/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/TrackArtwork.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackArtwork.ts index 8c8cbe25c19..aff79b2ed55 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TrackArtwork.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackArtwork.ts @@ -38,6 +38,12 @@ export interface TrackArtwork { * @memberof TrackArtwork */ _1000x1000?: string; + /** + * + * @type {Array} + * @memberof TrackArtwork + */ + mirrors?: Array; } /** @@ -62,6 +68,7 @@ export function TrackArtworkFromJSONTyped(json: any, ignoreDiscriminator: boolea '_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'], }; } @@ -77,6 +84,7 @@ export function TrackArtworkToJSON(value?: TrackArtwork | null): any { '150x150': value._150x150, '480x480': value._480x480, '1000x1000': value._1000x1000, + 'mirrors': value.mirrors, }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackCommentsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackCommentsResponse.ts index 461333ad9e3..6ad8cc1ea7d 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TrackCommentsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackCommentsResponse.ts @@ -20,6 +20,18 @@ import { CommentFromJSONTyped, CommentToJSON, } from './Comment'; +import type { Related } from './Related'; +import { + RelatedFromJSON, + RelatedFromJSONTyped, + RelatedToJSON, +} from './Related'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,12 +39,60 @@ import { * @interface TrackCommentsResponse */ export interface TrackCommentsResponse { + /** + * + * @type {number} + * @memberof TrackCommentsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrackCommentsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrackCommentsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrackCommentsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrackCommentsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TrackCommentsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrackCommentsResponse + */ + version: VersionMetadata; /** * * @type {Array} * @memberof TrackCommentsResponse */ data?: Array; + /** + * + * @type {Related} + * @memberof TrackCommentsResponse + */ + related?: Related; } /** @@ -40,6 +100,13 @@ export interface TrackCommentsResponse { */ export function instanceOfTrackCommentsResponse(value: object): value is TrackCommentsResponse { 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; } @@ -54,7 +121,15 @@ export function TrackCommentsResponseFromJSONTyped(json: any, ignoreDiscriminato } 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(CommentFromJSON)), + 'related': !exists(json, 'related') ? undefined : RelatedFromJSON(json['related']), }; } @@ -67,7 +142,15 @@ export function TrackCommentsResponseToJSON(value?: TrackCommentsResponse | 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(CommentToJSON)), + 'related': RelatedToJSON(value.related), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackElement.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackElement.ts deleted file mode 100644 index c09a6225eb9..00000000000 --- a/packages/sdk/src/sdk/api/generated/default/models/TrackElement.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* 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 TrackElement - */ -export interface TrackElement { - /** - * - * @type {string} - * @memberof TrackElement - */ - parentTrackId: string; -} - -/** - * Check if a given object implements the TrackElement interface. - */ -export function instanceOfTrackElement(value: object): value is TrackElement { - let isInstance = true; - isInstance = isInstance && "parentTrackId" in value && value["parentTrackId"] !== undefined; - - return isInstance; -} - -export function TrackElementFromJSON(json: any): TrackElement { - return TrackElementFromJSONTyped(json, false); -} - -export function TrackElementFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackElement { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'parentTrackId': json['parent_track_id'], - }; -} - -export function TrackElementToJSON(value?: TrackElement | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'parent_track_id': value.parentTrackId, - }; -} - diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackFavoritesResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackFavoritesResponse.ts index b8d17ae3c2f..7bc688fbb1d 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TrackFavoritesResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackFavoritesResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface TrackFavoritesResponse */ export interface TrackFavoritesResponse { + /** + * + * @type {number} + * @memberof TrackFavoritesResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrackFavoritesResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrackFavoritesResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrackFavoritesResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrackFavoritesResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TrackFavoritesResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrackFavoritesResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface TrackFavoritesResponse { */ export function instanceOfTrackFavoritesResponse(value: object): value is TrackFavoritesResponse { 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; } @@ -54,6 +109,13 @@ export function TrackFavoritesResponseFromJSONTyped(json: any, ignoreDiscriminat } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function TrackFavoritesResponseToJSON(value?: TrackFavoritesResponse | nu } 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(UserToJSON)), }; } 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..7ad1e63cd0b --- /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 { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; + +/** + * + * @export + * @interface TrackFeedItem + */ +export interface TrackFeedItem { + /** + * + * @type {string} + * @memberof TrackFeedItem + */ + type: string; + /** + * + * @type {Track} + * @memberof TrackFeedItem + */ + item: Track; +} + +/** + * 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': TrackFromJSON(json['item']), + }; +} + +export function TrackFeedItemToJSON(value?: TrackFeedItem | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'item': TrackToJSON(value.item), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponse.ts new file mode 100644 index 00000000000..95f07471bc8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponse.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 { TrackActivity } from './TrackActivity'; +import { + TrackActivityFromJSON, + TrackActivityFromJSONTyped, + TrackActivityToJSON, +} from './TrackActivity'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TrackLibraryResponse + */ +export interface TrackLibraryResponse { + /** + * + * @type {number} + * @memberof TrackLibraryResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrackLibraryResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TrackLibraryResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrackLibraryResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TrackLibraryResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the TrackLibraryResponse interface. + */ +export function instanceOfTrackLibraryResponse(value: object): value is TrackLibraryResponse { + 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 TrackLibraryResponseFromJSON(json: any): TrackLibraryResponse { + return TrackLibraryResponseFromJSONTyped(json, false); +} + +export function TrackLibraryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackLibraryResponse { + 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(TrackActivityFromJSON)), + }; +} + +export function TrackLibraryResponseToJSON(value?: TrackLibraryResponse | 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(TrackActivityToJSON)), + }; +} + 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/TrackRepostsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackRepostsResponse.ts index 1af78ef92ec..bac4cc6e0c5 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TrackRepostsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackRepostsResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface TrackRepostsResponse */ export interface TrackRepostsResponse { + /** + * + * @type {number} + * @memberof TrackRepostsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrackRepostsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrackRepostsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrackRepostsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrackRepostsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TrackRepostsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrackRepostsResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface TrackRepostsResponse { */ export function instanceOfTrackRepostsResponse(value: object): value is TrackRepostsResponse { 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; } @@ -54,6 +109,13 @@ export function TrackRepostsResponseFromJSONTyped(json: any, ignoreDiscriminator } 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(UserFromJSON)), }; } @@ -67,6 +129,13 @@ export function TrackRepostsResponseToJSON(value?: TrackRepostsResponse | 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(UserToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackResponse.ts index 53ce0925c4b..a0d74dc5169 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TrackResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackResponse.ts @@ -20,6 +20,12 @@ import { TrackFromJSONTyped, TrackToJSON, } from './Track'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface TrackResponse */ export interface TrackResponse { + /** + * + * @type {number} + * @memberof TrackResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrackResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrackResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrackResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrackResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TrackResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrackResponse + */ + version: VersionMetadata; /** * * @type {Track} @@ -40,6 +88,13 @@ export interface TrackResponse { */ export function instanceOfTrackResponse(value: object): value is TrackResponse { 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; } @@ -54,6 +109,13 @@ export function TrackResponseFromJSONTyped(json: any, ignoreDiscriminator: boole } 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 : TrackFromJSON(json['data']), }; } @@ -67,6 +129,13 @@ export function TrackResponseToJSON(value?: TrackResponse | null): any { } 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': TrackToJSON(value.data), }; } 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/Tracks.ts b/packages/sdk/src/sdk/api/generated/default/models/Tracks.ts new file mode 100644 index 00000000000..1fae3b587a7 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Tracks.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 { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface Tracks + */ +export interface Tracks { + /** + * + * @type {number} + * @memberof Tracks + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof Tracks + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof Tracks + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof Tracks + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof Tracks + */ + signature: string; + /** + * + * @type {string} + * @memberof Tracks + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof Tracks + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof Tracks + */ + data?: Array; +} + +/** + * Check if a given object implements the Tracks interface. + */ +export function instanceOfTracks(value: object): value is Tracks { + 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 TracksFromJSON(json: any): Tracks { + return TracksFromJSONTyped(json, false); +} + +export function TracksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tracks { + 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(TrackFromJSON)), + }; +} + +export function TracksToJSON(value?: Tracks | 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(TrackToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TracksCountResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TracksCountResponse.ts index f69ebd0a498..d62d882fa35 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TracksCountResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TracksCountResponse.ts @@ -21,11 +21,11 @@ import { exists, mapValues } from '../runtime'; */ export interface TracksCountResponse { /** - * + * The total number of tracks matching the filter criteria * @type {number} * @memberof TracksCountResponse */ - data?: number; + data: number; } /** @@ -33,6 +33,7 @@ export interface TracksCountResponse { */ export function instanceOfTracksCountResponse(value: object): value is TracksCountResponse { let isInstance = true; + isInstance = isInstance && "data" in value && value["data"] !== undefined; return isInstance; } @@ -47,7 +48,7 @@ export function TracksCountResponseFromJSONTyped(json: any, ignoreDiscriminator: } return { - 'data': !exists(json, 'data') ? undefined : json['data'], + 'data': json['data'], }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/TracksResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TracksResponse.ts index ae59cbdc142..a0537d84044 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TracksResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TracksResponse.ts @@ -20,6 +20,12 @@ import { TrackFromJSONTyped, TrackToJSON, } from './Track'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface TracksResponse */ export interface TracksResponse { + /** + * + * @type {number} + * @memberof TracksResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TracksResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TracksResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TracksResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TracksResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TracksResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TracksResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface TracksResponse { */ export function instanceOfTracksResponse(value: object): value is TracksResponse { 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; } @@ -54,6 +109,13 @@ export function TracksResponseFromJSONTyped(json: any, ignoreDiscriminator: bool } 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(TrackFromJSON)), }; } @@ -67,6 +129,13 @@ export function TracksResponseToJSON(value?: TracksResponse | null): any { } 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(TrackToJSON)), }; } 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/TrendingPlaylistsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistsResponse.ts index 9a220cdb2cd..7bce1bbc1bd 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingPlaylistsResponse.ts @@ -20,6 +20,12 @@ import { PlaylistFromJSONTyped, PlaylistToJSON, } from './Playlist'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,6 +33,48 @@ import { * @interface TrendingPlaylistsResponse */ export interface TrendingPlaylistsResponse { + /** + * + * @type {number} + * @memberof TrendingPlaylistsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrendingPlaylistsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrendingPlaylistsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrendingPlaylistsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrendingPlaylistsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof TrendingPlaylistsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrendingPlaylistsResponse + */ + version: VersionMetadata; /** * * @type {Array} @@ -40,6 +88,13 @@ export interface TrendingPlaylistsResponse { */ export function instanceOfTrendingPlaylistsResponse(value: object): value is TrendingPlaylistsResponse { 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; } @@ -54,6 +109,13 @@ export function TrendingPlaylistsResponseFromJSONTyped(json: any, ignoreDiscrimi } 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(PlaylistFromJSON)), }; } @@ -67,6 +129,13 @@ export function TrendingPlaylistsResponseToJSON(value?: TrendingPlaylistsRespons } 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(PlaylistToJSON)), }; } 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/UpdateCoinRequestBody.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdateCoinRequest.ts similarity index 71% rename from packages/sdk/src/sdk/api/generated/default/models/UpdateCoinRequestBody.ts rename to packages/sdk/src/sdk/api/generated/default/models/UpdateCoinRequest.ts index b7e984def5c..8da77b0d2e5 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/UpdateCoinRequestBody.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdateCoinRequest.ts @@ -17,61 +17,61 @@ import { exists, mapValues } from '../runtime'; /** * Request body for updating coin information * @export - * @interface UpdateCoinRequestBody + * @interface UpdateCoinRequest */ -export interface UpdateCoinRequestBody { +export interface UpdateCoinRequest { /** * The description of the coin (max 2500 characters) * @type {string} - * @memberof UpdateCoinRequestBody + * @memberof UpdateCoinRequest */ description?: string; /** * URL for the coin's banner image * @type {string} - * @memberof UpdateCoinRequestBody + * @memberof UpdateCoinRequest */ bannerImageUrl?: string; /** * Generic link URL for the coin * @type {string} - * @memberof UpdateCoinRequestBody + * @memberof UpdateCoinRequest */ link1?: string; /** * Generic link URL for the coin * @type {string} - * @memberof UpdateCoinRequestBody + * @memberof UpdateCoinRequest */ link2?: string; /** * Generic link URL for the coin * @type {string} - * @memberof UpdateCoinRequestBody + * @memberof UpdateCoinRequest */ link3?: string; /** * Generic link URL for the coin * @type {string} - * @memberof UpdateCoinRequestBody + * @memberof UpdateCoinRequest */ link4?: string; } /** - * Check if a given object implements the UpdateCoinRequestBody interface. + * Check if a given object implements the UpdateCoinRequest interface. */ -export function instanceOfUpdateCoinRequestBody(value: object): value is UpdateCoinRequestBody { +export function instanceOfUpdateCoinRequest(value: object): value is UpdateCoinRequest { let isInstance = true; return isInstance; } -export function UpdateCoinRequestBodyFromJSON(json: any): UpdateCoinRequestBody { - return UpdateCoinRequestBodyFromJSONTyped(json, false); +export function UpdateCoinRequestFromJSON(json: any): UpdateCoinRequest { + return UpdateCoinRequestFromJSONTyped(json, false); } -export function UpdateCoinRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCoinRequestBody { +export function UpdateCoinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCoinRequest { if ((json === undefined) || (json === null)) { return json; } @@ -86,7 +86,7 @@ export function UpdateCoinRequestBodyFromJSONTyped(json: any, ignoreDiscriminato }; } -export function UpdateCoinRequestBodyToJSON(value?: UpdateCoinRequestBody | null): any { +export function UpdateCoinRequestToJSON(value?: UpdateCoinRequest | null): any { if (value === undefined) { return undefined; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequestBody.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequestBody.ts index a79ffb8f04d..9044b131f17 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequestBody.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequestBody.ts @@ -14,12 +14,12 @@ */ import { exists, mapValues } from '../runtime'; -import type { CreateUserRequestBodyEvents } from './CreateUserRequestBodyEvents'; +import type { UpdateUserRequestBodyEvents } from './UpdateUserRequestBodyEvents'; import { - CreateUserRequestBodyEventsFromJSON, - CreateUserRequestBodyEventsFromJSONTyped, - CreateUserRequestBodyEventsToJSON, -} from './CreateUserRequestBodyEvents'; + UpdateUserRequestBodyEventsFromJSON, + UpdateUserRequestBodyEventsFromJSONTyped, + UpdateUserRequestBodyEventsToJSON, +} from './UpdateUserRequestBodyEvents'; import type { UserPlaylistLibrary } from './UserPlaylistLibrary'; import { UserPlaylistLibraryFromJSON, @@ -155,10 +155,10 @@ export interface UpdateUserRequestBody { playlistLibrary?: UserPlaylistLibrary; /** * - * @type {CreateUserRequestBodyEvents} + * @type {UpdateUserRequestBodyEvents} * @memberof UpdateUserRequestBody */ - events?: CreateUserRequestBodyEvents; + events?: UpdateUserRequestBodyEvents; } @@ -210,7 +210,7 @@ export function UpdateUserRequestBodyFromJSONTyped(json: any, ignoreDiscriminato 'splUsdcPayoutWallet': !exists(json, 'spl_usdc_payout_wallet') ? undefined : json['spl_usdc_payout_wallet'], 'coinFlairMint': !exists(json, 'coin_flair_mint') ? undefined : json['coin_flair_mint'], 'playlistLibrary': !exists(json, 'playlist_library') ? undefined : UserPlaylistLibraryFromJSON(json['playlist_library']), - 'events': !exists(json, 'events') ? undefined : CreateUserRequestBodyEventsFromJSON(json['events']), + 'events': !exists(json, 'events') ? undefined : UpdateUserRequestBodyEventsFromJSON(json['events']), }; } @@ -243,7 +243,7 @@ export function UpdateUserRequestBodyToJSON(value?: UpdateUserRequestBody | null 'spl_usdc_payout_wallet': value.splUsdcPayoutWallet, 'coin_flair_mint': value.coinFlairMint, 'playlist_library': UserPlaylistLibraryToJSON(value.playlistLibrary), - 'events': CreateUserRequestBodyEventsToJSON(value.events), + 'events': UpdateUserRequestBodyEventsToJSON(value.events), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequestBodyEvents.ts b/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequestBodyEvents.ts similarity index 64% rename from packages/sdk/src/sdk/api/generated/default/models/CreateUserRequestBodyEvents.ts rename to packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequestBodyEvents.ts index 88a8c3a5a64..b842cba351e 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CreateUserRequestBodyEvents.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/UpdateUserRequestBodyEvents.ts @@ -17,37 +17,37 @@ import { exists, mapValues } from '../runtime'; /** * User events for tracking referrals and mobile users * @export - * @interface CreateUserRequestBodyEvents + * @interface UpdateUserRequestBodyEvents */ -export interface CreateUserRequestBodyEvents { +export interface UpdateUserRequestBodyEvents { /** * Hash ID of the user who referred this user * @type {string} - * @memberof CreateUserRequestBodyEvents + * @memberof UpdateUserRequestBodyEvents */ referrer?: string; /** * Whether the user is on mobile * @type {boolean} - * @memberof CreateUserRequestBodyEvents + * @memberof UpdateUserRequestBodyEvents */ isMobileUser?: boolean; } /** - * Check if a given object implements the CreateUserRequestBodyEvents interface. + * Check if a given object implements the UpdateUserRequestBodyEvents interface. */ -export function instanceOfCreateUserRequestBodyEvents(value: object): value is CreateUserRequestBodyEvents { +export function instanceOfUpdateUserRequestBodyEvents(value: object): value is UpdateUserRequestBodyEvents { let isInstance = true; return isInstance; } -export function CreateUserRequestBodyEventsFromJSON(json: any): CreateUserRequestBodyEvents { - return CreateUserRequestBodyEventsFromJSONTyped(json, false); +export function UpdateUserRequestBodyEventsFromJSON(json: any): UpdateUserRequestBodyEvents { + return UpdateUserRequestBodyEventsFromJSONTyped(json, false); } -export function CreateUserRequestBodyEventsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUserRequestBodyEvents { +export function UpdateUserRequestBodyEventsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserRequestBodyEvents { if ((json === undefined) || (json === null)) { return json; } @@ -58,7 +58,7 @@ export function CreateUserRequestBodyEventsFromJSONTyped(json: any, ignoreDiscri }; } -export function CreateUserRequestBodyEventsToJSON(value?: CreateUserRequestBodyEvents | null): any { +export function UpdateUserRequestBodyEventsToJSON(value?: UpdateUserRequestBodyEvents | null): any { if (value === undefined) { return undefined; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/MediaLink.ts b/packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts similarity index 56% rename from packages/sdk/src/sdk/api/generated/default/models/MediaLink.ts rename to packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts index 7f5b4eed8b3..189a2324136 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/MediaLink.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts @@ -17,48 +17,49 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface MediaLink + * @interface UrlWithMirrors */ -export interface MediaLink { +export interface UrlWithMirrors { /** * * @type {string} - * @memberof MediaLink + * @memberof UrlWithMirrors */ url?: string; /** * * @type {Array} - * @memberof MediaLink + * @memberof UrlWithMirrors */ - mirrors?: Array; + mirrors: Array; } /** - * Check if a given object implements the MediaLink interface. + * Check if a given object implements the UrlWithMirrors interface. */ -export function instanceOfMediaLink(value: object): value is MediaLink { +export function instanceOfUrlWithMirrors(value: object): value is UrlWithMirrors { let isInstance = true; + isInstance = isInstance && "mirrors" in value && value["mirrors"] !== undefined; return isInstance; } -export function MediaLinkFromJSON(json: any): MediaLink { - return MediaLinkFromJSONTyped(json, false); +export function UrlWithMirrorsFromJSON(json: any): UrlWithMirrors { + return UrlWithMirrorsFromJSONTyped(json, false); } -export function MediaLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaLink { +export function UrlWithMirrorsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UrlWithMirrors { if ((json === undefined) || (json === null)) { return json; } return { 'url': !exists(json, 'url') ? undefined : json['url'], - 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + 'mirrors': json['mirrors'], }; } -export function MediaLinkToJSON(value?: MediaLink | null): any { +export function UrlWithMirrorsToJSON(value?: UrlWithMirrors | null): any { if (value === undefined) { return undefined; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.ts new file mode 100644 index 00000000000..a259488e079 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.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 UsdcGate + */ +export interface UsdcGate { + /** + * + * @type {{ [key: string]: number; }} + * @memberof UsdcGate + */ + splits: { [key: string]: number; }; + /** + * + * @type {number} + * @memberof UsdcGate + */ + price: number; +} + +/** + * Check if a given object implements the UsdcGate interface. + */ +export function instanceOfUsdcGate(value: object): value is UsdcGate { + let isInstance = true; + isInstance = isInstance && "splits" in value && value["splits"] !== undefined; + isInstance = isInstance && "price" in value && value["price"] !== undefined; + + return isInstance; +} + +export function UsdcGateFromJSON(json: any): UsdcGate { + return UsdcGateFromJSONTyped(json, false); +} + +export function UsdcGateFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcGate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'splits': json['splits'], + 'price': json['price'], + }; +} + +export function UsdcGateToJSON(value?: UsdcGate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'splits': value.splits, + 'price': value.price, + }; +} + 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/User.ts b/packages/sdk/src/sdk/api/generated/default/models/User.ts index e0c0eeff152..899ac4a7b8d 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/User.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/User.ts @@ -20,12 +20,24 @@ import { CoverPhotoFromJSONTyped, CoverPhotoToJSON, } from './CoverPhoto'; +import type { PlaylistLibrary } from './PlaylistLibrary'; +import { + PlaylistLibraryFromJSON, + PlaylistLibraryFromJSONTyped, + PlaylistLibraryToJSON, +} from './PlaylistLibrary'; import type { ProfilePicture } from './ProfilePicture'; import { ProfilePictureFromJSON, ProfilePictureFromJSONTyped, ProfilePictureToJSON, } from './ProfilePicture'; +import type { UserArtistCoinBadge } from './UserArtistCoinBadge'; +import { + UserArtistCoinBadgeFromJSON, + UserArtistCoinBadgeFromJSONTyped, + UserArtistCoinBadgeToJSON, +} from './UserArtistCoinBadge'; /** * @@ -45,6 +57,18 @@ export interface User { * @memberof User */ artistPickTrackId?: string; + /** + * + * @type {UserArtistCoinBadge} + * @memberof User + */ + artistCoinBadge: UserArtistCoinBadge; + /** + * + * @type {string} + * @memberof User + */ + coinFlairMint?: string; /** * * @type {string} @@ -236,61 +260,49 @@ export interface User { * @type {string} * @memberof User */ - balance?: string; - /** - * - * @type {string} - * @memberof User - */ - associatedWalletsBalance?: string; + balance: string; /** * * @type {string} * @memberof User */ - totalBalance?: string; + associatedWalletsBalance: string; /** * * @type {string} * @memberof User */ - payoutWallet?: string; + totalBalance: string; /** * * @type {string} * @memberof User */ - waudioBalance?: string; + waudioBalance: string; /** * * @type {string} * @memberof User */ - associatedSolWalletsBalance?: string; + associatedSolWalletsBalance: string; /** * * @type {number} * @memberof User */ - blocknumber?: number; - /** - * - * @type {Date} - * @memberof User - */ - createdAt?: Date; + blocknumber: number; /** * - * @type {Date} + * @type {string} * @memberof User */ - updatedAt?: Date; + createdAt: string; /** * * @type {boolean} * @memberof User */ - isStorageV2?: boolean; + isStorageV2: boolean; /** * * @type {string} @@ -302,103 +314,97 @@ export interface User { * @type {number} * @memberof User */ - currentUserFolloweeFollowCount?: number; + currentUserFolloweeFollowCount: number; /** * * @type {boolean} * @memberof User */ - doesCurrentUserFollow?: boolean; + doesCurrentUserFollow: boolean; /** * * @type {boolean} * @memberof User */ - doesCurrentUserSubscribe?: boolean; + doesCurrentUserSubscribe: boolean; /** * * @type {boolean} * @memberof User */ - doesFollowCurrentUser?: boolean; + doesFollowCurrentUser: boolean; /** * * @type {string} * @memberof User */ - handleLc?: string; + handleLc: string; /** * * @type {string} * @memberof User */ - profileType?: string; + updatedAt: string; /** * - * @type {number} + * @type {string} * @memberof User */ - userId?: number; + coverPhotoSizes?: string; /** * - * @type {boolean} + * @type {CoverPhoto} * @memberof User */ - hasCollectibles?: boolean; + coverPhotoCids?: CoverPhoto; /** * - * @type {boolean} + * @type {string} * @memberof User */ - allowAiAttribution?: boolean; + coverPhotoLegacy?: string; /** * * @type {string} * @memberof User */ - coinFlairMint?: string; + profilePictureSizes?: string; /** * - * @type {object} + * @type {ProfilePicture} * @memberof User */ - artistCoinBadge?: object; + profilePictureCids?: ProfilePicture; /** * * @type {string} * @memberof User */ - coverPhotoSizes?: string; - /** - * - * @type {object} - * @memberof User - */ - coverPhotoCids?: object; + profilePictureLegacy?: string; /** * - * @type {object} + * @type {boolean} * @memberof User */ - coverPhotoLegacy?: object; + hasCollectibles: boolean; /** * - * @type {string} + * @type {PlaylistLibrary} * @memberof User */ - profilePictureSizes?: string; + playlistLibrary?: PlaylistLibrary; /** * - * @type {object} + * @type {boolean} * @memberof User */ - profilePictureCids?: object; + allowAiAttribution: boolean; /** * - * @type {object} + * @type {string} * @memberof User */ - profilePictureLegacy?: object; + profileType?: string; } /** @@ -407,6 +413,7 @@ export interface User { export function instanceOfUser(value: object): value is User { 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; @@ -428,6 +435,22 @@ export function instanceOfUser(value: object): value is User { 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; } @@ -444,6 +467,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User 'albumCount': json['album_count'], 'artistPickTrackId': !exists(json, 'artist_pick_track_id') ? undefined : json['artist_pick_track_id'], + 'artistCoinBadge': UserArtistCoinBadgeFromJSON(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 : CoverPhotoFromJSON(json['cover_photo']), 'followeeCount': json['followee_count'], @@ -475,34 +500,31 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User 'supportingCount': json['supporting_count'], 'totalAudioBalance': json['total_audio_balance'], 'wallet': json['wallet'], - 'balance': !exists(json, 'balance') ? undefined : json['balance'], - 'associatedWalletsBalance': !exists(json, 'associated_wallets_balance') ? undefined : json['associated_wallets_balance'], - 'totalBalance': !exists(json, 'total_balance') ? undefined : json['total_balance'], - 'payoutWallet': !exists(json, 'payout_wallet') ? undefined : json['payout_wallet'], - 'waudioBalance': !exists(json, 'waudio_balance') ? undefined : json['waudio_balance'], - 'associatedSolWalletsBalance': !exists(json, 'associated_sol_wallets_balance') ? undefined : json['associated_sol_wallets_balance'], - 'blocknumber': !exists(json, 'blocknumber') ? undefined : json['blocknumber'], - 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), - 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), - 'isStorageV2': !exists(json, 'is_storage_v2') ? undefined : json['is_storage_v2'], + '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': !exists(json, 'current_user_followee_follow_count') ? undefined : json['current_user_followee_follow_count'], - 'doesCurrentUserFollow': !exists(json, 'does_current_user_follow') ? undefined : json['does_current_user_follow'], - 'doesCurrentUserSubscribe': !exists(json, 'does_current_user_subscribe') ? undefined : json['does_current_user_subscribe'], - 'doesFollowCurrentUser': !exists(json, 'does_follow_current_user') ? undefined : json['does_follow_current_user'], - 'handleLc': !exists(json, 'handle_lc') ? undefined : json['handle_lc'], - 'profileType': !exists(json, 'profile_type') ? undefined : json['profile_type'], - 'userId': !exists(json, 'user_id') ? undefined : json['user_id'], - 'hasCollectibles': !exists(json, 'has_collectibles') ? undefined : json['has_collectibles'], - 'allowAiAttribution': !exists(json, 'allow_ai_attribution') ? undefined : json['allow_ai_attribution'], - 'coinFlairMint': !exists(json, 'coin_flair_mint') ? undefined : json['coin_flair_mint'], - 'artistCoinBadge': !exists(json, 'artist_coin_badge') ? undefined : json['artist_coin_badge'], + '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 : json['cover_photo_cids'], + '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 : json['profile_picture_cids'], + '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'], }; } @@ -517,6 +539,8 @@ export function UserToJSON(value?: User | null): any { 'album_count': value.albumCount, 'artist_pick_track_id': value.artistPickTrackId, + 'artist_coin_badge': UserArtistCoinBadgeToJSON(value.artistCoinBadge), + 'coin_flair_mint': value.coinFlairMint, 'bio': value.bio, 'cover_photo': CoverPhotoToJSON(value.coverPhoto), 'followee_count': value.followeeCount, @@ -551,12 +575,10 @@ export function UserToJSON(value?: User | null): any { 'balance': value.balance, 'associated_wallets_balance': value.associatedWalletsBalance, 'total_balance': value.totalBalance, - 'payout_wallet': value.payoutWallet, 'waudio_balance': value.waudioBalance, 'associated_sol_wallets_balance': value.associatedSolWalletsBalance, 'blocknumber': value.blocknumber, - 'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()), - 'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()), + 'created_at': value.createdAt, 'is_storage_v2': value.isStorageV2, 'creator_node_endpoint': value.creatorNodeEndpoint, 'current_user_followee_follow_count': value.currentUserFolloweeFollowCount, @@ -564,18 +586,17 @@ export function UserToJSON(value?: User | null): any { 'does_current_user_subscribe': value.doesCurrentUserSubscribe, 'does_follow_current_user': value.doesFollowCurrentUser, 'handle_lc': value.handleLc, - 'profile_type': value.profileType, - 'user_id': value.userId, - 'has_collectibles': value.hasCollectibles, - 'allow_ai_attribution': value.allowAiAttribution, - 'coin_flair_mint': value.coinFlairMint, - 'artist_coin_badge': value.artistCoinBadge, + 'updated_at': value.updatedAt, 'cover_photo_sizes': value.coverPhotoSizes, - 'cover_photo_cids': value.coverPhotoCids, + 'cover_photo_cids': CoverPhotoToJSON(value.coverPhotoCids), 'cover_photo_legacy': value.coverPhotoLegacy, 'profile_picture_sizes': value.profilePictureSizes, - 'profile_picture_cids': value.profilePictureCids, + '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/UserAccountResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/UserAccountResponse.ts new file mode 100644 index 00000000000..43d6ec3d9a9 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserAccountResponse.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 { Account } from './Account'; +import { + AccountFromJSON, + AccountFromJSONTyped, + AccountToJSON, +} from './Account'; + +/** + * + * @export + * @interface UserAccountResponse + */ +export interface UserAccountResponse { + /** + * + * @type {Account} + * @memberof UserAccountResponse + */ + data?: Account; +} + +/** + * Check if a given object implements the UserAccountResponse interface. + */ +export function instanceOfUserAccountResponse(value: object): value is UserAccountResponse { + let isInstance = true; + + return isInstance; +} + +export function UserAccountResponseFromJSON(json: any): UserAccountResponse { + return UserAccountResponseFromJSONTyped(json, false); +} + +export function UserAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAccountResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : AccountFromJSON(json['data']), + }; +} + +export function UserAccountResponseToJSON(value?: UserAccountResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': AccountToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserArtistCoinBadge.ts b/packages/sdk/src/sdk/api/generated/default/models/UserArtistCoinBadge.ts new file mode 100644 index 00000000000..6132959fce0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserArtistCoinBadge.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 UserArtistCoinBadge + */ +export interface UserArtistCoinBadge { + /** + * + * @type {string} + * @memberof UserArtistCoinBadge + */ + mint?: string; + /** + * + * @type {string} + * @memberof UserArtistCoinBadge + */ + logoUri?: string; + /** + * + * @type {string} + * @memberof UserArtistCoinBadge + */ + bannerImageUrl?: string; + /** + * The coin symbol/ticker + * @type {string} + * @memberof UserArtistCoinBadge + */ + ticker?: string; +} + +/** + * Check if a given object implements the UserArtistCoinBadge interface. + */ +export function instanceOfUserArtistCoinBadge(value: object): value is UserArtistCoinBadge { + let isInstance = true; + + return isInstance; +} + +export function UserArtistCoinBadgeFromJSON(json: any): UserArtistCoinBadge { + return UserArtistCoinBadgeFromJSONTyped(json, false); +} + +export function UserArtistCoinBadgeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserArtistCoinBadge { + 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 UserArtistCoinBadgeToJSON(value?: UserArtistCoinBadge | 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/UserCommentsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/UserCommentsResponse.ts index 22265a03064..f2160d8ac6b 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/UserCommentsResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/UserCommentsResponse.ts @@ -20,6 +20,18 @@ import { CommentFromJSONTyped, CommentToJSON, } from './Comment'; +import type { Related } from './Related'; +import { + RelatedFromJSON, + RelatedFromJSONTyped, + RelatedToJSON, +} from './Related'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -27,12 +39,60 @@ import { * @interface UserCommentsResponse */ export interface UserCommentsResponse { + /** + * + * @type {number} + * @memberof UserCommentsResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof UserCommentsResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof UserCommentsResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof UserCommentsResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof UserCommentsResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof UserCommentsResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof UserCommentsResponse + */ + version: VersionMetadata; /** * * @type {Array} * @memberof UserCommentsResponse */ data?: Array; + /** + * + * @type {Related} + * @memberof UserCommentsResponse + */ + related?: Related; } /** @@ -40,6 +100,13 @@ export interface UserCommentsResponse { */ export function instanceOfUserCommentsResponse(value: object): value is UserCommentsResponse { 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; } @@ -54,7 +121,15 @@ export function UserCommentsResponseFromJSONTyped(json: any, ignoreDiscriminator } 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(CommentFromJSON)), + 'related': !exists(json, 'related') ? undefined : RelatedFromJSON(json['related']), }; } @@ -67,7 +142,15 @@ export function UserCommentsResponseToJSON(value?: UserCommentsResponse | 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(CommentToJSON)), + 'related': RelatedToJSON(value.related), }; } 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/UserManager.ts b/packages/sdk/src/sdk/api/generated/default/models/UserManager.ts new file mode 100644 index 00000000000..0db75d21cf4 --- /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 { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface UserManager + */ +export interface UserManager { + /** + * + * @type {User} + * @memberof UserManager + */ + manager: User; + /** + * + * @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': UserFromJSON(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': UserToJSON(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/UserResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/UserResponse.ts index 94cfb6289ef..a9d59edd72e 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/UserResponse.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/UserResponse.ts @@ -20,6 +20,12 @@ import { UserFromJSONTyped, UserToJSON, } from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; /** * @@ -29,10 +35,52 @@ import { export interface UserResponse { /** * - * @type {User} + * @type {number} + * @memberof UserResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof UserResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof UserResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof UserResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof UserResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof UserResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof UserResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} * @memberof UserResponse */ - data?: User; + data?: Array; } /** @@ -40,6 +88,13 @@ export interface UserResponse { */ export function instanceOfUserResponse(value: object): value is UserResponse { 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; } @@ -54,7 +109,14 @@ export function UserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'data': !exists(json, 'data') ? undefined : UserFromJSON(json['data']), + '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(UserFromJSON)), }; } @@ -67,7 +129,14 @@ export function UserResponseToJSON(value?: UserResponse | null): any { } return { - 'data': UserToJSON(value.data), + '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(UserToJSON)), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/UserResponseSingle.ts b/packages/sdk/src/sdk/api/generated/default/models/UserResponseSingle.ts new file mode 100644 index 00000000000..a08ff662b15 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserResponseSingle.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 { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface UserResponseSingle + */ +export interface UserResponseSingle { + /** + * + * @type {User} + * @memberof UserResponseSingle + */ + data?: User; +} + +/** + * Check if a given object implements the UserResponseSingle interface. + */ +export function instanceOfUserResponseSingle(value: object): value is UserResponseSingle { + let isInstance = true; + + return isInstance; +} + +export function UserResponseSingleFromJSON(json: any): UserResponseSingle { + return UserResponseSingleFromJSONTyped(json, false); +} + +export function UserResponseSingleFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserResponseSingle { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : UserFromJSON(json['data']), + }; +} + +export function UserResponseSingleToJSON(value?: UserResponseSingle | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': UserToJSON(value.data), + }; +} + 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 9f15f71149e..e8c1b3d3312 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/index.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/index.ts @@ -3,11 +3,33 @@ export * from './Access'; export * from './AccessGate'; export * from './AccessInfoResponse'; +export * from './Account'; +export * from './AccountCollection'; +export * from './AccountCollectionUser'; export * from './Activity'; export * from './AddManagerRequestBody'; export * from './AlbumBacklink'; export * from './AlbumsResponse'; +export * from './AnnouncementNotification'; +export * from './AnnouncementNotificationAction'; +export * from './AnnouncementNotificationActionData'; export * from './ApproveGrantRequestBody'; +export * from './ApproveManagerRequestNotification'; +export * from './ApproveManagerRequestNotificationAction'; +export * from './ApproveManagerRequestNotificationActionData'; +export * from './ArtistCoinFees'; +export * from './ArtistLocker'; +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'; @@ -15,41 +37,64 @@ export * from './BalanceHistoryResponse'; export * from './BestSellingItem'; export * from './BestSellingResponse'; export * from './BlobInfo'; +export * from './BulkSubscribersResponse'; export * from './ChallengeResponse'; +export * from './ChallengeRewardNotification'; +export * from './ChallengeRewardNotificationAction'; +export * from './ChallengeRewardNotificationActionData'; +export * from './CidData'; +export * from './CidDataResponse'; export * from './ClaimRewardsRequestBody'; export * from './ClaimRewardsResponse'; export * from './ClaimRewardsResponseDataInner'; +export * from './ClaimableRewardNotification'; +export * from './ClaimableRewardNotificationAction'; +export * from './ClaimableRewardNotificationActionData'; export * from './ClaimedPrize'; export * from './ClaimedPrizesResponse'; export * from './Coin'; -export * from './CoinArtistFees'; -export * from './CoinArtistLocker'; -export * from './CoinDynamicBondingCurve'; -export * from './CoinExtensions'; export * from './CoinInsights'; +export * from './CoinInsightsDynamicBondingCurve'; +export * from './CoinInsightsExtensions'; export * from './CoinInsightsResponse'; export * from './CoinMember'; export * from './CoinMembersCountResponse'; export * from './CoinMembersResponse'; export * from './CoinResponse'; -export * from './CoinRewardPool'; export * from './CoinsResponse'; export * from './CoinsVolumeLeadersResponse'; export * from './CoinsVolumeLeadersResponseDataInner'; export * from './Collectibles'; export * from './CollectiblesResponse'; -export * from './CollectionActivity'; +export * from './CollectionActivityWithoutTracks'; +export * from './CollectionLibraryResponse'; export * from './Comment'; export * from './CommentEntityType'; 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 './CreateAccessKeyResponse'; -export * from './CreateCoinRequestBody'; +export * from './CreateCoinRequest'; export * from './CreateCoinResponse'; export * from './CreateCoinResponseData'; export * from './CreateCommentRequestBody'; @@ -57,29 +102,34 @@ export * from './CreateCommentResponse'; export * from './CreateDeveloperAppRequestBody'; export * from './CreateDeveloperAppResponse'; export * from './CreateGrantRequestBody'; +export * from './CreateNotification'; +export * from './CreateNotificationAction'; +export * from './CreateNotificationActionData'; +export * from './CreatePlaylistNotificationActionData'; export * from './CreatePlaylistRequestBody'; export * from './CreatePlaylistRequestBodyCopyrightLine'; export * from './CreatePlaylistRequestBodyProducerCopyrightLine'; export * from './CreatePlaylistResponse'; -export * from './CreateRewardCodeRequestBody'; +export * from './CreateRewardCodeRequest'; export * from './CreateRewardCodeResponse'; +export * from './CreateTrackNotificationActionData'; export * from './CreateTrackRequestBody'; export * from './CreateTrackResponse'; -export * from './CreateUserDeveloperAppRequestBody'; -export * from './CreateUserDeveloperAppResponse'; export * from './CreateUserRequestBody'; -export * from './CreateUserRequestBodyEvents'; export * from './CreateUserResponse'; export * from './DashboardWalletUser'; export * from './DashboardWalletUsersResponse'; +export * from './DataAndType'; export * from './DdexCopyright'; export * from './DdexResourceContributor'; +export * from './DdexRightsController'; export * from './DeactivateAccessKeyRequestBody'; export * from './DeactivateAccessKeyResponse'; export * from './DecodedUserToken'; export * from './DeveloperApp'; export * from './DeveloperAppResponse'; export * from './DeveloperAppsResponse'; +export * from './DynamicBondingCurveInsights'; export * from './EmailAccess'; export * from './EmailAccessResponse'; export * from './Event'; @@ -89,121 +139,257 @@ 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 './FavoriteRequestBody'; 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 './Genre'; export * from './GetChallenges'; export * from './GetSupportedUsers'; +export * from './GetSupporter'; export * from './GetSupporters'; +export * from './GetSupporting'; export * from './GetTipsResponse'; +export * from './Grant'; export * from './HistoryResponse'; export * from './ListenCount'; -export * from './MediaLink'; +export * from './ListenStreakReminderNotification'; +export * from './ListenStreakReminderNotificationAction'; +export * from './ListenStreakReminderNotificationActionData'; +export * from './ManagedUser'; +export * from './ManagedUsersResponse'; +export * from './ManagersResponse'; +export * from './MilestoneNotification'; +export * from './MilestoneNotificationAction'; +export * from './MilestoneNotificationActionData'; export * from './MonthlyAggregatePlay'; export * from './Mood'; export * from './MutualFollowersResponse'; +export * from './NftCollection'; +export * from './NftGate'; +export * from './Notification'; +export * from './Notifications'; +export * from './NotificationsResponse'; export * from './PinCommentRequestBody'; export * from './Playlist'; export * from './PlaylistAddedTimestamp'; export * from './PlaylistArtwork'; +export * from './PlaylistFeedItem'; +export * from './PlaylistLibrary'; export * from './PlaylistLibraryExplorePlaylistIdentifier'; export * from './PlaylistLibraryFolder'; export * from './PlaylistLibraryPlaylistIdentifier'; +export * from './PlaylistMilestoneNotificationActionData'; export * from './PlaylistResponse'; export * from './PlaylistSearchResult'; export * from './PlaylistTracksResponse'; +export * from './PlaylistUpdate'; +export * from './PlaylistUpdates'; +export * from './PlaylistUpdatesResponse'; +export * from './PlaylistWithoutTracks'; export * from './PlaylistsResponse'; export * from './PrizeClaimRequestBody'; export * from './PrizeClaimResponse'; export * from './PrizePublic'; export * from './PrizesResponse'; export * from './ProfilePicture'; +export * from './Purchase'; +export * from './PurchaseGate'; +export * from './PurchaseSplit'; +export * from './PurchasersCountResponse'; export * from './PurchasersResponse'; +export * from './PurchasesCountResponse'; +export * from './PurchasesResponse'; export * from './ReactCommentRequestBody'; +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 './RedeemAmountResponse'; +export * from './Related'; export * from './RelatedArtistResponse'; +export * from './Remix'; +export * from './RemixNotification'; +export * from './RemixNotificationAction'; +export * from './RemixNotificationActionData'; export * from './RemixParent'; export * from './RemixParentWrite'; +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 './RepostRequestBody'; export * from './Reposts'; +export * from './RequestManagerNotification'; +export * from './RequestManagerNotificationAction'; +export * from './RequestManagerNotificationActionData'; export * from './RewardCodeErrorResponse'; export * from './RewardCodeResponse'; +export * from './RewardPool'; export * from './SaleJson'; 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 './SearchModel'; +export * from './SearchPlaylist'; +export * from './SearchResponse'; +export * from './SearchTrack'; +export * from './SendTipNotification'; +export * from './SendTipNotificationAction'; +export * from './SendTipNotificationActionData'; export * from './Stem'; -export * from './StemCategory'; 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 './SupporterReference'; 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 './TopGenreUsersResponse'; export * from './TopListener'; +export * from './TopUsersResponse'; export * from './Track'; export * from './TrackAccessInfo'; export * from './TrackActivity'; +export * from './TrackAddedToPlaylistNotification'; +export * from './TrackAddedToPlaylistNotificationAction'; +export * from './TrackAddedToPlaylistNotificationActionData'; +export * from './TrackAddedToPurchasedAlbumNotification'; +export * from './TrackAddedToPurchasedAlbumNotificationAction'; +export * from './TrackAddedToPurchasedAlbumNotificationActionData'; export * from './TrackArtwork'; export * from './TrackCommentCountResponse'; export * from './TrackCommentNotificationResponse'; export * from './TrackCommentsResponse'; export * from './TrackDownloadRequestBody'; -export * from './TrackElement'; export * from './TrackElementWrite'; export * from './TrackFavoritesResponse'; +export * from './TrackFeedItem'; export * from './TrackId'; export * from './TrackInspect'; export * from './TrackInspectList'; +export * from './TrackLibraryResponse'; +export * from './TrackMilestoneNotificationActionData'; export * from './TrackRepostsResponse'; export * from './TrackResponse'; export * from './TrackSearch'; +export * from './TrackSegment'; +export * from './Tracks'; 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 './UpdateCoinRequestBody'; +export * from './UpdateCoinRequest'; export * from './UpdateCoinResponse'; export * from './UpdateCommentRequestBody'; export * from './UpdateDeveloperAppRequestBody'; export * from './UpdatePlaylistRequestBody'; export * from './UpdateTrackRequestBody'; export * from './UpdateUserRequestBody'; +export * from './UpdateUserRequestBodyEvents'; +export * from './UrlWithMirrors'; +export * from './UsdcGate'; +export * from './UsdcPurchaseBuyerNotification'; +export * from './UsdcPurchaseBuyerNotificationAction'; +export * from './UsdcPurchaseBuyerNotificationActionData'; +export * from './UsdcPurchaseSellerNotification'; +export * from './UsdcPurchaseSellerNotificationAction'; +export * from './UsdcPurchaseSellerNotificationActionData'; export * from './User'; +export * from './UserAccountResponse'; +export * from './UserArtistCoinBadge'; 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 './UserIdAddress'; export * from './UserIdsAddressesResponse'; +export * from './UserManager'; +export * from './UserMilestoneNotificationActionData'; export * from './UserPlaylistLibrary'; export * from './UserPlaylistLibraryContentsInner'; export * from './UserResponse'; +export * from './UserResponseSingle'; export * from './UserSearch'; +export * from './UserSubscribers'; export * from './UserTrackListenCountsResponse'; export * from './UserTracksRemixedResponse'; -export * from './UsersResponse'; export * from './VerifyToken'; +export * from './VersionMetadata'; export * from './WriteResponse'; diff --git a/packages/sdk/src/sdk/api/generator/gen.js b/packages/sdk/src/sdk/api/generator/gen.js index a8c604c20ea..8b44bb378ac 100644 --- a/packages/sdk/src/sdk/api/generator/gen.js +++ b/packages/sdk/src/sdk/api/generator/gen.js @@ -60,6 +60,13 @@ const downloadSpec = async ({ env, apiVersion, apiFlavor }) => { fs.writeFileSync(path.join(process.env.PWD, SWAGGER_SPEC_PATH), spec) } +const copySpecFromLocal = (specPath) => { + const absolutePath = path.isAbsolute(specPath) + ? specPath + : path.join(process.env.PWD, specPath) + fs.copyFileSync(absolutePath, path.join(process.env.PWD, SWAGGER_SPEC_PATH)) +} + const generate = async ({ apiFlavor, generator }) => { const outputFolderName = apiFlavor === '' ? 'default' : apiFlavor const openApiGeneratorArgs = [ @@ -83,10 +90,18 @@ program .option('--env ', 'The environment of the DN to gen from', 'prod') .option('--api-version ', 'The API version', 'v1') .option('--api-flavor ', 'The API flavor', '') + .option( + '--spec ', + 'Use a local swagger YAML file instead of fetching (path relative to cwd or absolute)' + ) .option('--generator ', 'The generator to use', 'typescript-fetch') .action(async (options) => { clearOutput(options) - await downloadSpec(options) + if (options.spec) { + copySpecFromLocal(options.spec) + } else { + await downloadSpec(options) + } await generate(options) }) diff --git a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts index 921a4f9865c..d55a7581b2c 100644 --- a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts +++ b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts @@ -10,6 +10,7 @@ import { Storage } from '../../services/Storage' import { StorageNodeSelector } from '../../services/StorageNodeSelector' import { Configuration, Mood, Genre } from '../generated/default' import { PlaylistsApi as GeneratedPlaylistsApi } from '../generated/default/apis/PlaylistsApi' +import type { PlaylistResponse } from '../generated/default/models/PlaylistResponse' import { TrackUploadHelper } from '../tracks/TrackUploadHelper' import { PlaylistsApi } from './PlaylistsApi' @@ -77,21 +78,20 @@ vitest } as any }) +const mockPlaylistResponse: PlaylistResponse = { + latestChainBlock: 0, + latestIndexedBlock: 0, + latestChainSlotPlays: 0, + latestIndexedSlotPlays: 0, + signature: '', + timestamp: '', + version: { service: 'api', version: '1.0' }, + data: [] +} + vitest .spyOn(GeneratedPlaylistsApi.prototype, 'getPlaylist') - .mockImplementation(async () => { - return { - data: [ - { - playlistName: 'test', - playlistContents: [ - { trackId: 'yyNwXq7', timestamp: 1 }, - { trackId: 'yyNwXq7', timestamp: 1 } - ] - } as any - ] - } - }) + .mockImplementation(async () => mockPlaylistResponse) describe('PlaylistsApi', () => { // TODO: Move this setup out of describe @@ -137,7 +137,8 @@ describe('PlaylistsApi', () => { playlistContents: [ { trackId: 'yyNwXq7', - timestamp: 1 + timestamp: 1, + metadataTimestamp: 1 } ] } diff --git a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts index 6f8e04fc68f..ef7c532943a 100644 --- a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts +++ b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts @@ -170,9 +170,12 @@ export class PlaylistsApi extends GeneratedPlaylistsApi { // Write tracks to chain const trackIds = await Promise.all( trackMetadatas.map(async (t, i) => { - // Transform track metadata + // Transform track metadata (cast: SDK upload schema and API body types align at runtime) const trackMetadata = this.combineMetadata( - this.trackUploadHelper.transformTrackUploadMetadataV2(t, userId), + this.trackUploadHelper.transformTrackUploadMetadataV2( + t as unknown as CreateTrackRequestBody, + userId + ) as CreateTrackRequestBody, playlistMetadata ) @@ -253,7 +256,8 @@ export class PlaylistsApi extends GeneratedPlaylistsApi { ...params.metadata, playlistContents: (trackIds ?? []).map((trackId) => ({ trackId: encodeHashId(trackId)!, - timestamp + timestamp, + metadataTimestamp: timestamp })), playlistImageSizesMultihash: imageUploadResponse?.orig_file_cid } diff --git a/packages/sdk/src/sdk/api/tracks/TracksApi.ts b/packages/sdk/src/sdk/api/tracks/TracksApi.ts index 03e0f022407..df1c68f44b4 100644 --- a/packages/sdk/src/sdk/api/tracks/TracksApi.ts +++ b/packages/sdk/src/sdk/api/tracks/TracksApi.ts @@ -36,6 +36,7 @@ import { type UnrepostTrackRequest, type RecordTrackDownloadRequest } from '../generated/default' +import type { UpdateTrackRequest as GeneratedUpdateTrackRequest } from '../generated/default/apis/TracksApi' import { RequiredError } from '../generated/default/runtime' import { TrackUploadHelper } from './TrackUploadHelper' @@ -486,21 +487,20 @@ export class TracksApi extends GeneratedTracksApi { const res = await this.updateTrackWithEntityManager({ trackId: params.trackId, userId: params.userId, - metadata + metadata: metadata as EntityManagerUpdateTrackRequest['metadata'] }) return { success: true, transactionHash: res.transactionHash } } - return super.updateTrack( - { - trackId: params.trackId, - userId: params.userId, - metadata: params.metadata - }, - requestInit - ) + const updateRequest: GeneratedUpdateTrackRequest = { + trackId: params.trackId, + userId: params.userId, + metadata: + params.metadata as unknown as GeneratedUpdateTrackRequest['metadata'] + } + return super.updateTrack(updateRequest, requestInit) } /** @hidden diff --git a/packages/sdk/src/sdk/api/tracks/types.ts b/packages/sdk/src/sdk/api/tracks/types.ts index 94b0625765c..c29bacba0af 100644 --- a/packages/sdk/src/sdk/api/tracks/types.ts +++ b/packages/sdk/src/sdk/api/tracks/types.ts @@ -10,10 +10,10 @@ import { } from '../../types/DDEX' import { AudioFile, ImageFile } from '../../types/File' import { HashId } from '../../types/HashId' +import { StemCategory } from '../../types/StemCategory' import { Mood, Genre, - StemCategory, type UpdateTrackRequest, type CreateTrackRequest } from '../generated/default' diff --git a/packages/web/src/common/store/cache/collections/createAlbumSaga.ts b/packages/web/src/common/store/cache/collections/createAlbumSaga.ts index bca976e522c..32120f0b9cf 100644 --- a/packages/web/src/common/store/cache/collections/createAlbumSaga.ts +++ b/packages/web/src/common/store/cache/collections/createAlbumSaga.ts @@ -173,7 +173,8 @@ function* createAndConfirmAlbum( ? [ { trackId: Id.parse(initTrack.track_id), - timestamp: Date.now() / 1000 + timestamp: Math.round(Date.now() / 1000), + metadataTimestamp: Math.round(Date.now() / 1000) } ] : undefined diff --git a/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts b/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts index 71976c8067d..fc6293374bd 100644 --- a/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts +++ b/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts @@ -197,7 +197,8 @@ function* createAndConfirmPlaylist( ? [ { timestamp: Math.round(Date.now() / 1000), // must use seconds - trackId: Id.parse(initTrack.track_id) + trackId: Id.parse(initTrack.track_id), + metadataTimestamp: Math.round(Date.now() / 1000) } ] : [] diff --git a/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx b/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx index 7ff89573bba..a298184a675 100644 --- a/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx +++ b/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx @@ -415,9 +415,9 @@ export const BuySellFlow = (props: BuySellFlowProps) => { swapTokens.outputTokenInfo?.address ) const pricePerBaseToken = useMemo(() => { - return outputCoin?.price - ? outputCoin?.price - : (outputCoin?.dynamicBondingCurve.priceUSD ?? 0) + return outputCoin?.price !== undefined && outputCoin.price !== 0 + ? outputCoin.price + : (outputCoin?.dynamicBondingCurve?.priceUSD ?? 0) }, [outputCoin]) const isTransactionInvalid = !transactionData?.isValid diff --git a/packages/web/src/components/buy-sell-modal/BuyTab.tsx b/packages/web/src/components/buy-sell-modal/BuyTab.tsx index aeb79218c67..890087dded3 100644 --- a/packages/web/src/components/buy-sell-modal/BuyTab.tsx +++ b/packages/web/src/components/buy-sell-modal/BuyTab.tsx @@ -126,7 +126,7 @@ export const BuyTab = ({ onAmountChange={handleOutputAmountChange} availableBalance={0} exchangeRate={currentExchangeRate} - tokenPrice={tokenPriceData?.price.toString() ?? null} + tokenPrice={tokenPriceData?.price?.toString() ?? null} isTokenPriceLoading={isTokenPriceLoading} tokenPriceDecimalPlaces={decimalPlaces} availableTokens={artistCoins} diff --git a/packages/web/src/components/buy-sell-modal/ConvertTab.tsx b/packages/web/src/components/buy-sell-modal/ConvertTab.tsx index 92dc9708d36..a1955f42ee6 100644 --- a/packages/web/src/components/buy-sell-modal/ConvertTab.tsx +++ b/packages/web/src/components/buy-sell-modal/ConvertTab.tsx @@ -208,7 +208,7 @@ export const ConvertTab = ({ onAmountChange={handleOutputAmountChange} availableBalance={0} exchangeRate={currentExchangeRate} - tokenPrice={tokenPriceData?.price.toString() ?? null} + tokenPrice={tokenPriceData?.price?.toString() ?? null} isTokenPriceLoading={isTokenPriceLoading} tokenPriceDecimalPlaces={decimalPlaces} availableTokens={filteredAvailableOutputTokens} diff --git a/packages/web/src/components/buy-sell-modal/SellTab.tsx b/packages/web/src/components/buy-sell-modal/SellTab.tsx index 7c7e38e5744..311fe18c9ab 100644 --- a/packages/web/src/components/buy-sell-modal/SellTab.tsx +++ b/packages/web/src/components/buy-sell-modal/SellTab.tsx @@ -114,7 +114,7 @@ export const SellTab = ({ onAmountChange={handleOutputAmountChange} availableBalance={0} exchangeRate={currentExchangeRate} - tokenPrice={tokenPriceData?.price.toString() ?? null} + tokenPrice={tokenPriceData?.price?.toString() ?? null} isTokenPriceLoading={isTokenPriceLoading} tokenPriceDecimalPlaces={decimalPlaces} hideTokenDisplay={true} // Hide token display completely in sell tab output diff --git a/packages/web/src/components/user-generated-text/UserGeneratedTextV2.tsx b/packages/web/src/components/user-generated-text/UserGeneratedTextV2.tsx index fae03f06524..f1e313acde5 100644 --- a/packages/web/src/components/user-generated-text/UserGeneratedTextV2.tsx +++ b/packages/web/src/components/user-generated-text/UserGeneratedTextV2.tsx @@ -104,9 +104,12 @@ const Link = ({ const obj = { collection: res.data[0] } setUnfurledContent(formatCollectionName(obj)) } else if (instanceOfUserResponse(res)) { - const obj = { user: res.data } - setUnfurledContent(formatUserName(obj)) - setUnfurledContentObject(obj) + const user = Array.isArray(res.data) ? res.data[0] : res.data + if (user) { + const obj = { user } + setUnfurledContent(formatUserName(obj)) + setUnfurledContentObject(obj) + } } } } diff --git a/packages/web/src/hooks/useLaunchCoin.ts b/packages/web/src/hooks/useLaunchCoin.ts index a0b26556240..9785ecb858c 100644 --- a/packages/web/src/hooks/useLaunchCoin.ts +++ b/packages/web/src/hooks/useLaunchCoin.ts @@ -217,7 +217,7 @@ export const useLaunchCoin = () => { // Create coin in Audius database await sdk.coins.createCoin({ userId: Id.parse(userId), - metadata: { + createCoinRequest: { mint: mintPublicKey, ticker: `${symbolUpper}`, decimals: LAUNCHPAD_COIN_DECIMALS, diff --git a/packages/web/src/pages/artist-coins-launchpad-page/components/ArtistCoinsTable.tsx b/packages/web/src/pages/artist-coins-launchpad-page/components/ArtistCoinsTable.tsx index 08c9a7a2b8e..c2c2b6c9fa2 100644 --- a/packages/web/src/pages/artist-coins-launchpad-page/components/ArtistCoinsTable.tsx +++ b/packages/web/src/pages/artist-coins-launchpad-page/components/ArtistCoinsTable.tsx @@ -134,7 +134,7 @@ const renderTokenNameCell = (cellInfo: CoinCell) => { const renderPriceCell = (cellInfo: CoinCell) => { const coin = cellInfo.row.original const price = - coin.price === 0 ? coin.dynamicBondingCurve.priceUSD : coin.price + (coin.price === 0 ? coin.dynamicBondingCurve?.priceUSD : coin.price) ?? 0 return ( {formatCurrencyWithSubscript(price)} @@ -147,7 +147,7 @@ const renderMarketCapCell = (cellInfo: CoinCell) => { return ( {walletMessages.dollarSign} - {formatCount(Math.round(coin.marketCap))} + {formatCount(Math.round(coin.marketCap ?? 0))} ) } @@ -157,7 +157,7 @@ const renderTotalVolumeUSDCell = (cellInfo: CoinCell) => { return ( {walletMessages.dollarSign} - {formatCount(coin.totalVolumeUSD, 2)} + {formatCount(coin.totalVolumeUSD ?? 0, 2)} ) } @@ -166,7 +166,7 @@ const renderHoldersCell = (cellInfo: CoinCell) => { const coin = cellInfo.row.original return ( - {formatCount(coin.holder)} + {formatCount(coin.holder ?? 0)} ) }