diff --git a/packages/common/src/adapters/coin.ts b/packages/common/src/adapters/coin.ts index 1846321b006..5d0f665d522 100644 --- a/packages/common/src/adapters/coin.ts +++ b/packages/common/src/adapters/coin.ts @@ -56,7 +56,10 @@ export const coinFromSdk = (input: CoinSDK | undefined): Coin | undefined => { // Fall back to dynamic bonding curve data if so. const defaultSupply = 1e9 - const { isMigrated, priceUSD, address } = input.dynamicBondingCurve + const dbc = input.dynamicBondingCurve + const isMigrated = dbc?.isMigrated ?? true + const priceUSD = dbc?.priceUSD ?? 0 + const address = dbc?.address const hasBirdeyeSupply = input.totalSupply !== undefined && input.totalSupply > 0 const hasBirdeyePrice = input.price !== undefined && input.price > 0 @@ -66,15 +69,16 @@ 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 + ((!isMigrated && hasBondingCurveData) || !hasBirdeyePrice ? priceUSD - : input.price + : 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 + ((!isMigrated && hasBondingCurveData) || !hasBirdeyeSupply + ? 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 2fe6df27b68..237465a7006 100644 --- a/packages/common/src/adapters/collection.ts +++ b/packages/common/src/adapters/collection.ts @@ -4,6 +4,7 @@ import { full, Id, OptionalHashId, + type Playlist as PlaylistV1, UpdateAlbumRequest, UpdatePlaylistRequest } from '@audius/sdk' @@ -51,6 +52,7 @@ export const userCollectionMetadataFromSDK = ( | full.PlaylistFullWithoutTracks | full.SearchPlaylistFull | full.PlaylistFull + | PlaylistV1 ): UserCollectionMetadata | undefined => { try { const decodedPlaylistId = OptionalHashId.parse(input.id) @@ -74,7 +76,10 @@ export const userCollectionMetadataFromSDK = ( '150x150': input.artwork._150x150, '480x480': input.artwork._480x480, '1000x1000': input.artwork._1000x1000, - mirrors: input.artwork.mirrors + mirrors: + 'mirrors' in input.artwork + ? (input.artwork as { mirrors?: string[] }).mirrors + : undefined } : {}, variant: Variant.USER_GENERATED, diff --git a/packages/common/src/adapters/notification.ts b/packages/common/src/adapters/notification.ts index 3716378fd5e..0cc9835cc26 100644 --- a/packages/common/src/adapters/notification.ts +++ b/packages/common/src/adapters/notification.ts @@ -641,5 +641,7 @@ export const notificationFromSDK = ( ...formatBaseNotification(notification) } } + default: + return undefined } } diff --git a/packages/common/src/api/tan-query/batchers/__tests__/getCollectionsBatcher.test.ts b/packages/common/src/api/tan-query/batchers/__tests__/getCollectionsBatcher.test.ts index d74ccc5bc64..75bad868c66 100644 --- a/packages/common/src/api/tan-query/batchers/__tests__/getCollectionsBatcher.test.ts +++ b/packages/common/src/api/tan-query/batchers/__tests__/getCollectionsBatcher.test.ts @@ -107,24 +107,22 @@ describe('getCollectionsBatcher', () => { allowAiAttribution: false, supporterCount: 0, supportingCount: 0, - artistCoinBadge: undefined, - splUsdcWallet: undefined, + artistCoinBadge: {}, + splUsdcWallet: '', hasCollectibles: false } }) const mockSdk = { - full: { - playlists: { - getBulkPlaylists: vi - .fn() - .mockImplementation((params: GetBulkPlaylistsRequest) => { - const collections = params.id?.map((collectionId) => - createMockSdkCollection(HashId.parse(collectionId)) - ) - return Promise.resolve({ data: collections }) - }) - } + playlists: { + getBulkPlaylists: vi + .fn() + .mockImplementation((params: GetBulkPlaylistsRequest) => { + const collections = params.id?.map((collectionId) => + createMockSdkCollection(HashId.parse(collectionId)) + ) + return Promise.resolve({ data: collections }) + }) } } as unknown as BatchContext['sdk'] @@ -144,7 +142,7 @@ describe('getCollectionsBatcher', () => { const id = 1 const result = await batcher.fetch(id) - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenCalledWith({ + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenCalledWith({ id: [Id.parse(id)], userId: OptionalId.parse(null) }) @@ -165,8 +163,8 @@ describe('getCollectionsBatcher', () => { const results = await Promise.all(ids.map((id) => batcher.fetch(id))) // Verify single bulk request was made - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenCalledTimes(1) - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenCalledWith({ + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenCalledTimes(1) + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenCalledWith({ id: ids.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) @@ -202,12 +200,12 @@ describe('getCollectionsBatcher', () => { ) // Verify two separate bulk requests were made - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenCalledTimes(2) - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenNthCalledWith(1, { + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenCalledTimes(2) + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenNthCalledWith(1, { id: firstBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenNthCalledWith(2, { + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenNthCalledWith(2, { id: secondBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) @@ -244,7 +242,7 @@ describe('getCollectionsBatcher', () => { const missingId = 999 // Mock API to only return data for existingId - const mockBulkPlaylists = mockSdk.full.playlists + const mockBulkPlaylists = mockSdk.playlists .getBulkPlaylists as unknown as MockInstance< [GetBulkPlaylistsRequest], Promise<{ data: full.PlaylistFull[] }> @@ -278,8 +276,8 @@ describe('getCollectionsBatcher', () => { expect(missingResult).toBeNull() // Verify single batch request was made with both IDs - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenCalledTimes(1) - expect(mockSdk.full.playlists.getBulkPlaylists).toHaveBeenCalledWith({ + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenCalledTimes(1) + expect(mockSdk.playlists.getBulkPlaylists).toHaveBeenCalledWith({ id: [missingId, existingId].map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) diff --git a/packages/common/src/api/tan-query/batchers/__tests__/getTracksBatcher.test.ts b/packages/common/src/api/tan-query/batchers/__tests__/getTracksBatcher.test.ts index c72ff26aeba..69ac607bf46 100644 --- a/packages/common/src/api/tan-query/batchers/__tests__/getTracksBatcher.test.ts +++ b/packages/common/src/api/tan-query/batchers/__tests__/getTracksBatcher.test.ts @@ -141,7 +141,12 @@ describe('getTracksBatcher', () => { profilePictureCids: undefined, profilePictureLegacy: undefined, playlistLibrary: undefined, - allowAiAttribution: false + allowAiAttribution: false, + artistCoinBadge: {}, + splUsdcWallet: '', + supporterCount: 0, + supportingCount: 0, + hasCollectibles: false }, origFileCid: undefined, origFilename: undefined, @@ -157,17 +162,15 @@ describe('getTracksBatcher', () => { }) const mockSdk = { - full: { - tracks: { - getBulkTracks: vi - .fn() - .mockImplementation((params: GetBulkTracksRequest) => { - const tracks = params.id?.map((trackId) => - createMockSdkTrack(HashId.parse(trackId)) - ) - return Promise.resolve({ data: tracks }) - }) - } + tracks: { + getBulkTracks: vi + .fn() + .mockImplementation((params: GetBulkTracksRequest) => { + const tracks = params.id?.map((trackId) => + createMockSdkTrack(HashId.parse(trackId)) + ) + return Promise.resolve({ data: tracks }) + }) } } as unknown as BatchContext['sdk'] @@ -187,7 +190,7 @@ describe('getTracksBatcher', () => { const id = 1 const result = await batcher.fetch(id) - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenCalledWith({ + expect(mockSdk.tracks.getBulkTracks).toHaveBeenCalledWith({ id: [Id.parse(id)], userId: OptionalId.parse(null) }) @@ -204,8 +207,8 @@ describe('getTracksBatcher', () => { const results = await Promise.all(ids.map((id) => batcher.fetch(id))) // Verify single bulk request was made - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenCalledTimes(1) - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenCalledWith({ + expect(mockSdk.tracks.getBulkTracks).toHaveBeenCalledTimes(1) + expect(mockSdk.tracks.getBulkTracks).toHaveBeenCalledWith({ id: ids.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) @@ -237,12 +240,12 @@ describe('getTracksBatcher', () => { ) // Verify two separate bulk requests were made - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenCalledTimes(2) - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenNthCalledWith(1, { + expect(mockSdk.tracks.getBulkTracks).toHaveBeenCalledTimes(2) + expect(mockSdk.tracks.getBulkTracks).toHaveBeenNthCalledWith(1, { id: firstBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenNthCalledWith(2, { + expect(mockSdk.tracks.getBulkTracks).toHaveBeenNthCalledWith(2, { id: secondBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) @@ -273,7 +276,7 @@ describe('getTracksBatcher', () => { const missingId = 999 // Mock API to only return data for existingId - const mockBulkTracks = mockSdk.full.tracks + const mockBulkTracks = mockSdk.tracks .getBulkTracks as unknown as MockInstance< [GetBulkTracksRequest], Promise<{ data: full.TrackFull[] }> @@ -301,8 +304,8 @@ describe('getTracksBatcher', () => { expect(missingResult).toBeNull() // Verify single batch request was made with both IDs - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenCalledTimes(1) - expect(mockSdk.full.tracks.getBulkTracks).toHaveBeenCalledWith({ + expect(mockSdk.tracks.getBulkTracks).toHaveBeenCalledTimes(1) + expect(mockSdk.tracks.getBulkTracks).toHaveBeenCalledWith({ id: [missingId, existingId].map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) diff --git a/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts b/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts index d6852521e84..5d084eb965d 100644 --- a/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts +++ b/packages/common/src/api/tan-query/batchers/__tests__/getUsersBatcher.test.ts @@ -57,21 +57,24 @@ describe('getUsersBatcher', () => { blocknumber: 0, isStorageV2: false, doesCurrentUserSubscribe: false, - allowAiAttribution: false + allowAiAttribution: false, + artistCoinBadge: {}, + splUsdcWallet: '', + supporterCount: 0, + supportingCount: 0, + hasCollectibles: false }) const mockSdk = { - full: { - users: { - getBulkUsers: vi - .fn() - .mockImplementation((params: GetBulkUsersRequest) => { - const users = params.id?.map((userId) => - createMockSdkUser(HashId.parse(userId)) - ) - return Promise.resolve({ data: users }) - }) - } + users: { + getBulkUsers: vi + .fn() + .mockImplementation((params: GetBulkUsersRequest) => { + const users = params.id?.map((userId) => + createMockSdkUser(HashId.parse(userId)) + ) + return Promise.resolve({ data: users }) + }) } } as unknown as BatchContext['sdk'] @@ -91,7 +94,7 @@ describe('getUsersBatcher', () => { const id = 1 const result = await batcher.fetch(id) - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledWith({ + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledWith({ id: [Id.parse(id)], userId: OptionalId.parse(null) }) @@ -108,8 +111,8 @@ describe('getUsersBatcher', () => { const results = await Promise.all(ids.map((id) => batcher.fetch(id))) // Verify single bulk request was made - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledTimes(1) - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledWith({ + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledTimes(1) + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledWith({ id: ids.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) @@ -141,12 +144,12 @@ describe('getUsersBatcher', () => { ) // Verify two separate bulk requests were made - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledTimes(2) - expect(mockSdk.full.users.getBulkUsers).toHaveBeenNthCalledWith(1, { + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledTimes(2) + expect(mockSdk.users.getBulkUsers).toHaveBeenNthCalledWith(1, { id: firstBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) - expect(mockSdk.full.users.getBulkUsers).toHaveBeenNthCalledWith(2, { + expect(mockSdk.users.getBulkUsers).toHaveBeenNthCalledWith(2, { id: secondBatchIds.map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) @@ -171,8 +174,7 @@ describe('getUsersBatcher', () => { const missingId = 999 // Mock API to only return data for existingId - const mockBulkUsers = mockSdk.full.users - .getBulkUsers as unknown as MockInstance< + const mockBulkUsers = mockSdk.users.getBulkUsers as unknown as MockInstance< [GetBulkUsersRequest], Promise<{ data: full.UserFull[] }> > @@ -199,8 +201,8 @@ describe('getUsersBatcher', () => { expect(missingResult).toBeNull() // Verify single batch request was made with both IDs - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledTimes(1) - expect(mockSdk.full.users.getBulkUsers).toHaveBeenCalledWith({ + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledTimes(1) + expect(mockSdk.users.getBulkUsers).toHaveBeenCalledWith({ id: [missingId, existingId].map((id) => Id.parse(id)), userId: OptionalId.parse(null) }) diff --git a/packages/common/src/api/tan-query/batchers/getCollectionsBatcher.ts b/packages/common/src/api/tan-query/batchers/getCollectionsBatcher.ts index 1b29725ad22..106851d8e67 100644 --- a/packages/common/src/api/tan-query/batchers/getCollectionsBatcher.ts +++ b/packages/common/src/api/tan-query/batchers/getCollectionsBatcher.ts @@ -19,7 +19,7 @@ export const getCollectionsBatcher = memoize( const { sdk, currentUserId, queryClient } = context if (!ids.length) return [] - const { data } = await sdk.full.playlists.getBulkPlaylists({ + const { data } = await sdk.playlists.getBulkPlaylists({ id: ids.map((id) => Id.parse(id)), userId: OptionalId.parse(currentUserId) }) diff --git a/packages/common/src/api/tan-query/batchers/getTracksBatcher.ts b/packages/common/src/api/tan-query/batchers/getTracksBatcher.ts index 0b2976c2a78..b5dc80ef771 100644 --- a/packages/common/src/api/tan-query/batchers/getTracksBatcher.ts +++ b/packages/common/src/api/tan-query/batchers/getTracksBatcher.ts @@ -19,7 +19,7 @@ export const getTracksBatcher = memoize( const { sdk, currentUserId, queryClient } = context if (!ids.length) return [] - const { data } = await sdk.full.tracks.getBulkTracks({ + const { data } = await sdk.tracks.getBulkTracks({ id: ids.map((id) => Id.parse(id)), userId: OptionalId.parse(currentUserId) }) diff --git a/packages/common/src/api/tan-query/batchers/getUsersBatcher.ts b/packages/common/src/api/tan-query/batchers/getUsersBatcher.ts index 08116053333..e6b0ca1ae18 100644 --- a/packages/common/src/api/tan-query/batchers/getUsersBatcher.ts +++ b/packages/common/src/api/tan-query/batchers/getUsersBatcher.ts @@ -17,7 +17,7 @@ export const getUsersBatcher = memoize( fetcher: async (ids: ID[]): Promise => { const { sdk, currentUserId } = context if (!ids.length) return [] - const { data } = await sdk.full.users.getBulkUsers({ + const { data } = await sdk.users.getBulkUsers({ id: ids.map((id) => Id.parse(id)), userId: OptionalId.parse(currentUserId) }) diff --git a/packages/common/src/api/tan-query/collection/useCollectionByPermalink.ts b/packages/common/src/api/tan-query/collection/useCollectionByPermalink.ts index 918f13751f1..f63c4bf78b5 100644 --- a/packages/common/src/api/tan-query/collection/useCollectionByPermalink.ts +++ b/packages/common/src/api/tan-query/collection/useCollectionByPermalink.ts @@ -43,13 +43,13 @@ export const getCollectionByPermalinkQueryFn = async ( sdk: any ) => { const { handle, slug } = playlistPermalinkToHandleAndSlug(permalink) - const { data = [] } = await sdk.full.playlists.getPlaylistByHandleAndSlug({ + const playlistRes = await sdk.playlists.getPlaylistByHandleAndSlug({ handle, slug, userId: OptionalId.parse(currentUserId) }) - - const collection = userCollectionMetadataFromSDK(data[0]) + const playlist = playlistRes?.data?.[0] + const collection = playlist ? userCollectionMetadataFromSDK(playlist) : null if (collection) { // Prime related entities diff --git a/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts b/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts index 757dc333bbf..d70aa53f821 100644 --- a/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts +++ b/packages/common/src/api/tan-query/collection/useCollectionFavorites.ts @@ -46,7 +46,7 @@ export const useCollectionFavorites = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.playlists.getUsersFromPlaylistFavorites({ + const { data } = await sdk.playlists.getUsersFromPlaylistFavorites({ playlistId: Id.parse(collectionId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/collection/useCollectionReposts.ts b/packages/common/src/api/tan-query/collection/useCollectionReposts.ts index 44298b5e13a..eb868f89d83 100644 --- a/packages/common/src/api/tan-query/collection/useCollectionReposts.ts +++ b/packages/common/src/api/tan-query/collection/useCollectionReposts.ts @@ -46,7 +46,7 @@ export const useCollectionReposts = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.playlists.getUsersFromPlaylistReposts({ + const { data } = await sdk.playlists.getUsersFromPlaylistReposts({ playlistId: Id.parse(collectionId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/collection/useLibraryCollections.ts b/packages/common/src/api/tan-query/collection/useLibraryCollections.ts index c632977bba6..15715ec23dd 100644 --- a/packages/common/src/api/tan-query/collection/useLibraryCollections.ts +++ b/packages/common/src/api/tan-query/collection/useLibraryCollections.ts @@ -94,8 +94,8 @@ export const useLibraryCollections = ( const { data: activities = [] } = collectionType === 'albums' - ? await sdk.full.users.getUserLibraryAlbums(requestParams) - : await sdk.full.users.getUserLibraryPlaylists(requestParams) + ? await sdk.users.getUserLibraryAlbums(requestParams) + : await sdk.users.getUserLibraryPlaylists(requestParams) const collections = transformAndCleanList(activities, ({ item }) => userCollectionMetadataFromSDK(item) diff --git a/packages/common/src/api/tan-query/comments/useComment.ts b/packages/common/src/api/tan-query/comments/useComment.ts index 751d3446213..2f6a17018cc 100644 --- a/packages/common/src/api/tan-query/comments/useComment.ts +++ b/packages/common/src/api/tan-query/comments/useComment.ts @@ -21,7 +21,7 @@ export const useComment = (commentId: ID | null | undefined) => { enabled: !!commentId, queryFn: async () => { const sdk = await audiusSdk() - const { data: commentRes } = await sdk.full.comments.getComment({ + const { data: commentRes } = await sdk.comments.getComment({ commentId: Id.parse(commentId) }) diff --git a/packages/common/src/api/tan-query/comments/useCommentReplies.ts b/packages/common/src/api/tan-query/comments/useCommentReplies.ts index 4d9e4265e30..509facc7af8 100644 --- a/packages/common/src/api/tan-query/comments/useCommentReplies.ts +++ b/packages/common/src/api/tan-query/comments/useCommentReplies.ts @@ -42,7 +42,7 @@ export const useCommentReplies = ( }, queryFn: async ({ pageParam }): Promise => { const sdk = await audiusSdk() - const response = await sdk.full.comments.getCommentReplies({ + const response = await sdk.comments.getCommentReplies({ commentId: Id.parse(commentId), userId: currentUserId?.toString(), limit: pageSize, diff --git a/packages/common/src/api/tan-query/comments/useTrackComments.ts b/packages/common/src/api/tan-query/comments/useTrackComments.ts index 0e3d3f65cd2..aa91c56d2c5 100644 --- a/packages/common/src/api/tan-query/comments/useTrackComments.ts +++ b/packages/common/src/api/tan-query/comments/useTrackComments.ts @@ -51,7 +51,7 @@ export const useTrackComments = ( queryKey: getTrackCommentListQueryKey({ trackId, sortMethod, pageSize }), queryFn: async ({ pageParam }): Promise => { const sdk = await audiusSdk() - const commentsRes = await sdk.full.tracks.getTrackComments({ + const commentsRes = await sdk.tracks.getTrackComments({ trackId: Id.parse(trackId), offset: pageParam, limit: pageSize, diff --git a/packages/common/src/api/tan-query/comments/useUserComments.ts b/packages/common/src/api/tan-query/comments/useUserComments.ts index 445f97395fa..3b4f5652936 100644 --- a/packages/common/src/api/tan-query/comments/useUserComments.ts +++ b/packages/common/src/api/tan-query/comments/useUserComments.ts @@ -46,7 +46,7 @@ export const useUserComments = ( queryKey: ['userCommentList', userId, pageSize], queryFn: async ({ pageParam }): Promise => { const sdk = await audiusSdk() - const commentsRes = await sdk.full.users.getUserComments({ + const commentsRes = await sdk.users.getUserComments({ id: Id.parse(userId), userId: OptionalId.parse(currentUserId), offset: pageParam, diff --git a/packages/common/src/api/tan-query/lineups/useExclusiveTracks.ts b/packages/common/src/api/tan-query/lineups/useExclusiveTracks.ts index e2b772c4ed1..01886d683dd 100644 --- a/packages/common/src/api/tan-query/lineups/useExclusiveTracks.ts +++ b/packages/common/src/api/tan-query/lineups/useExclusiveTracks.ts @@ -72,7 +72,7 @@ export const useExclusiveTracks = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data: tracks = [] } = await sdk.full.users.getTracksByUser({ + const { data: tracks = [] } = await sdk.users.getTracksByUser({ id: OptionalId.parse(userId)!, userId: OptionalId.parse(currentUserId), gateCondition: gateConditions as any, @@ -136,7 +136,7 @@ export const useExclusiveTracksCount = (args: { queryKey: [QUERY_KEYS.exclusiveTracksCount, userId, { gateConditions }], queryFn: async () => { const sdk = await audiusSdk() - const { data: count } = await sdk.full.users.getTracksCountByUser({ + const { data: count } = await sdk.users.getTracksCountByUser({ id: OptionalId.parse(userId)!, userId: OptionalId.parse(currentUserId), gateCondition: gateConditions as any diff --git a/packages/common/src/api/tan-query/lineups/useFeed.ts b/packages/common/src/api/tan-query/lineups/useFeed.ts index c5aca3ba530..21ea13d01a2 100644 --- a/packages/common/src/api/tan-query/lineups/useFeed.ts +++ b/packages/common/src/api/tan-query/lineups/useFeed.ts @@ -70,7 +70,7 @@ export const useFeed = ( const isFirstPage = pageParam === 0 const currentPageSize = isFirstPage ? initialPageSize : loadMorePageSize const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUserFeed({ + const { data = [] } = await sdk.users.getUserFeed({ id: Id.parse(currentUserId), userId: Id.parse(currentUserId), filter: filterMap[filter], diff --git a/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts b/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts index 883a2c6b6e2..4533165f47f 100644 --- a/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts +++ b/packages/common/src/api/tan-query/lineups/useLibraryTracks.ts @@ -86,7 +86,7 @@ export const useLibraryTracks = ( queryFn: async ({ pageParam = 0 }) => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUserLibraryTracks({ + const { data = [] } = await sdk.users.getUserLibraryTracks({ id: Id.parse(currentUserId), offset: pageParam, limit: pageSize, diff --git a/packages/common/src/api/tan-query/lineups/usePremiumTracks.ts b/packages/common/src/api/tan-query/lineups/usePremiumTracks.ts index 1151ad66eeb..1bb5dcac42c 100644 --- a/packages/common/src/api/tan-query/lineups/usePremiumTracks.ts +++ b/packages/common/src/api/tan-query/lineups/usePremiumTracks.ts @@ -53,7 +53,7 @@ export const usePremiumTracks = ( queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() const { data: tracks = [] } = - await sdk.full.tracks.getTrendingUSDCPurchaseTracks({ + await sdk.tracks.getTrendingUSDCPurchaseTracks({ userId: OptionalId.parse(currentUserId), limit: pageSize, offset: pageParam diff --git a/packages/common/src/api/tan-query/lineups/useProfileReposts.ts b/packages/common/src/api/tan-query/lineups/useProfileReposts.ts index 219ab5d9bf6..7260b553198 100644 --- a/packages/common/src/api/tan-query/lineups/useProfileReposts.ts +++ b/packages/common/src/api/tan-query/lineups/useProfileReposts.ts @@ -60,7 +60,7 @@ export const useProfileReposts = ( // If the @ is still at the beginning of the handle, trim it off const handleNoAt = handle.startsWith('@') ? handle.substring(1) : handle - const { data: repostsSDKData } = await sdk.full.users.getRepostsByHandle({ + const { data: repostsSDKData } = await sdk.users.getRepostsByHandle({ handle: handleNoAt, userId: OptionalId.parse(currentUserId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/lineups/useProfileTracks.ts b/packages/common/src/api/tan-query/lineups/useProfileTracks.ts index d9fe2833677..2d82ed6d7b9 100644 --- a/packages/common/src/api/tan-query/lineups/useProfileTracks.ts +++ b/packages/common/src/api/tan-query/lineups/useProfileTracks.ts @@ -69,7 +69,7 @@ export const useProfileTracks = ( if (!handle) return [] // If the @ is still at the beginning of the handle, trim it off const handleNoAt = handle.startsWith('@') ? handle.substring(1) : handle - const { data: tracks } = await sdk.full.users.getTracksByUserHandle({ + const { data: tracks } = await sdk.users.getTracksByUserHandle({ handle: handleNoAt, userId: OptionalId.parse(currentUserId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/lineups/useTrackPageLineup.ts b/packages/common/src/api/tan-query/lineups/useTrackPageLineup.ts index 19d2b18f71e..3935086b82e 100644 --- a/packages/common/src/api/tan-query/lineups/useTrackPageLineup.ts +++ b/packages/common/src/api/tan-query/lineups/useTrackPageLineup.ts @@ -105,7 +105,7 @@ export const useTrackPageLineup = ( heroTrack.remix_of?.tracks?.[0]?.parent_track_id if (heroTrackRemixParentTrackId) { - const remixParentTrack = await sdk.full.tracks.getTrack({ + const remixParentTrack = await sdk.tracks.getTrack({ trackId: Id.parse(heroTrackRemixParentTrackId), userId: OptionalId.parse(currentUserId) }) @@ -119,16 +119,16 @@ export const useTrackPageLineup = ( } } else { // If hero track is remixable (not a remix), get its remixes - const { data: remixesData } = await sdk.full.tracks.getTrackRemixes({ + const remixesRes = await sdk.tracks.getTrackRemixes({ trackId: Id.parse(trackId), userId: OptionalId.parse(currentUserId), limit: pageSize, offset: 0 }) - - if (remixesData?.tracks) { + const remixTracks = remixesRes?.tracks ?? [] + if (remixTracks.length) { const processedRemixes = transformAndCleanList( - remixesData.tracks, + remixTracks, userTrackMetadataFromSDK ) if (processedRemixes.length > 0) { @@ -140,7 +140,7 @@ export const useTrackPageLineup = ( } // Get more tracks by the artist - const { data = [] } = await sdk.full.users.getTracksByUserHandle({ + const { data = [] } = await sdk.users.getTracksByUserHandle({ handle: ownerHandle, userId: OptionalId.parse(currentUserId), sort: 'plays', @@ -168,7 +168,7 @@ export const useTrackPageLineup = ( // If there are no remixes, get recommended tracks based on genre if (indices.remixesSection.index === null) { - const { data: trendingData } = await sdk.full.tracks.getTrendingTracks({ + const { data: trendingData } = await sdk.tracks.getTrendingTracks({ genre: heroTrack.genre, limit: pageSize }) diff --git a/packages/common/src/api/tan-query/lineups/useTrending.ts b/packages/common/src/api/tan-query/lineups/useTrending.ts index 7c20ce28148..6a3c029ef3c 100644 --- a/packages/common/src/api/tan-query/lineups/useTrending.ts +++ b/packages/common/src/api/tan-query/lineups/useTrending.ts @@ -89,7 +89,7 @@ export const useTrending = ( const currentPageSize = isFirstPage ? initialPageSize : loadMorePageSize const { data: sdkResponse = [] } = version - ? await sdk.full.tracks.getTrendingTracksWithVersion({ + ? await sdk.tracks.getTrendingTracksWithVersion({ time: timeRange, genre: (genre as string) || undefined, userId: OptionalId.parse(currentUserId), @@ -97,7 +97,7 @@ export const useTrending = ( offset: pageParam, version }) - : await sdk.full.tracks.getTrendingTracks({ + : await sdk.tracks.getTrendingTracks({ time: timeRange, genre: (genre as string) || undefined, userId: OptionalId.parse(currentUserId), diff --git a/packages/common/src/api/tan-query/lineups/useTrendingUnderground.ts b/packages/common/src/api/tan-query/lineups/useTrendingUnderground.ts index ef247e08ef7..ce17bf447ce 100644 --- a/packages/common/src/api/tan-query/lineups/useTrendingUnderground.ts +++ b/packages/common/src/api/tan-query/lineups/useTrendingUnderground.ts @@ -53,7 +53,7 @@ export const useTrendingUnderground = ( queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.tracks.getUndergroundTrendingTracks({ + const { data = [] } = await sdk.tracks.getUndergroundTrendingTracks({ offset: pageParam, limit: pageSize, userId: OptionalId.parse(currentUserId) diff --git a/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts b/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts index 372e1d350f2..30a6ea93327 100644 --- a/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts +++ b/packages/common/src/api/tan-query/notifications/useNotificationUnreadCount.ts @@ -32,7 +32,7 @@ export const useNotificationUnreadCount = () => { queryKey: getNotificationUnreadCountQueryKey(currentUserId), queryFn: async () => { const sdk = await audiusSdk() - const { data } = await sdk.full.notifications.getNotifications({ + const { data } = await sdk.notifications.getNotifications({ userId: Id.parse(currentUserId), limit: 0 }) diff --git a/packages/common/src/api/tan-query/notifications/useNotifications.ts b/packages/common/src/api/tan-query/notifications/useNotifications.ts index b4aa54e9bb6..d84a935323b 100644 --- a/packages/common/src/api/tan-query/notifications/useNotifications.ts +++ b/packages/common/src/api/tan-query/notifications/useNotifications.ts @@ -202,7 +202,7 @@ export const useNotifications = (options?: QueryOptions) => { initialPageParam: null as PageParam, queryFn: async ({ pageParam = null }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.notifications.getNotifications({ + const { data } = await sdk.notifications.getNotifications({ userId: Id.parse(currentUserId), limit: DEFAULT_LIMIT, timestamp: pageParam?.timestamp, diff --git a/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts b/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts index 68bfbbd3177..e11d56fdba9 100644 --- a/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts +++ b/packages/common/src/api/tan-query/purchases/useAudioTransactions.ts @@ -63,7 +63,7 @@ export const useAudioTransactions = ( if (!userId) return [] const sdk = await audiusSdk() - const response = await sdk.full.users.getAudioTransactions({ + const response = await sdk.users.getAudioTransactions({ id: Id.parse(userId), offset: page * pageSize, limit: pageSize, diff --git a/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts b/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts index 989e5d914fe..15ce8d82222 100644 --- a/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts +++ b/packages/common/src/api/tan-query/purchases/useAudioTransactionsCount.ts @@ -30,7 +30,7 @@ export const useAudioTransactionsCount = ( if (!userId) return 0 const sdk = await audiusSdk() - const response = await sdk.full.users.getAudioTransactionCount({ + const response = await sdk.users.getAudioTransactionCount({ id: Id.parse(userId) }) diff --git a/packages/common/src/api/tan-query/purchases/usePurchasers.ts b/packages/common/src/api/tan-query/purchases/usePurchasers.ts index 2b94a84f637..ba99e689dd0 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchasers.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchasers.ts @@ -56,7 +56,7 @@ export const usePurchasers = ( queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() if (!currentUserId) return [] - const { data = [] } = await sdk.full.users.getPurchasers({ + const { data = [] } = await sdk.users.getPurchasers({ id: Id.parse(currentUserId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts b/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts index 3a08b0c20be..9fbbb4a32d0 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchasersCount.ts @@ -37,7 +37,7 @@ export const usePurchasersCount = ( queryFn: async () => { const sdk = await audiusSdk() if (!currentUserId) return 0 - const { data = 0 } = await sdk.full.users.getPurchasersCount({ + const { data = 0 } = await sdk.users.getPurchasersCount({ id: Id.parse(currentUserId), userId: Id.parse(currentUserId), contentId: OptionalId.parse(contentId), diff --git a/packages/common/src/api/tan-query/purchases/usePurchases.ts b/packages/common/src/api/tan-query/purchases/usePurchases.ts index ea1d765e85f..4226b02e0b3 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchases.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchases.ts @@ -61,7 +61,7 @@ export const usePurchases = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getPurchases({ + const { data = [] } = await sdk.users.getPurchases({ id: Id.parse(userId), userId: Id.parse(userId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts b/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts index 9fb3f864bd5..855874eb148 100644 --- a/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts +++ b/packages/common/src/api/tan-query/purchases/usePurchasesCount.ts @@ -28,7 +28,7 @@ export const usePurchasesCount = ( queryKey: getPurchasesCountQueryKey({ userId }), queryFn: async () => { const sdk = await audiusSdk() - const { data = 0 } = await sdk.full.users.getPurchasesCount({ + const { data = 0 } = await sdk.users.getPurchasesCount({ id: Id.parse(userId), userId: Id.parse(userId) }) diff --git a/packages/common/src/api/tan-query/purchases/useSales.ts b/packages/common/src/api/tan-query/purchases/useSales.ts index 485a7a922b6..7bb0c41ae5c 100644 --- a/packages/common/src/api/tan-query/purchases/useSales.ts +++ b/packages/common/src/api/tan-query/purchases/useSales.ts @@ -56,7 +56,7 @@ export const useSales = (args: GetSalesListArgs, options?: QueryOptions) => { }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getSales({ + const { data = [] } = await sdk.users.getSales({ id: Id.parse(userId!), userId: Id.parse(userId!), limit: pageSize, diff --git a/packages/common/src/api/tan-query/purchases/useSalesCount.ts b/packages/common/src/api/tan-query/purchases/useSalesCount.ts index 1a3e2c0f907..3396bda813b 100644 --- a/packages/common/src/api/tan-query/purchases/useSalesCount.ts +++ b/packages/common/src/api/tan-query/purchases/useSalesCount.ts @@ -22,7 +22,7 @@ export const useSalesCount = ( queryKey: getSalesCountQueryKey(userId), queryFn: async () => { const sdk = await audiusSdk() - const { data = 0 } = await sdk.full.users.getSalesCount({ + const { data = 0 } = await sdk.users.getSalesCount({ id: Id.parse(userId), userId: Id.parse(userId) }) diff --git a/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts b/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts index 4dde413cb3b..914378600aa 100644 --- a/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts +++ b/packages/common/src/api/tan-query/purchases/useUSDCTransactions.ts @@ -99,7 +99,7 @@ export const useUSDCTransactions = ( queryFn: async ({ pageParam }) => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUSDCTransactions({ + const { data = [] } = await sdk.users.getUSDCTransactions({ id: Id.parse(currentUserId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts b/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts index 64d7a74d900..8b3f444262c 100644 --- a/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts +++ b/packages/common/src/api/tan-query/purchases/useUSDCTransactionsCount.ts @@ -37,7 +37,7 @@ export const useUSDCTransactionsCount = ( queryFn: async () => { if (!currentUserId) return 0 const sdk = await audiusSdk() - const { data } = await sdk.full.users.getUSDCTransactionCount({ + const { data } = await sdk.users.getUSDCTransactionCount({ id: Id.parse(currentUserId), type: args?.type, method: args?.method diff --git a/packages/common/src/api/tan-query/remixes/useRemixers.ts b/packages/common/src/api/tan-query/remixes/useRemixers.ts index 4559958c377..3f2cf4a01e1 100644 --- a/packages/common/src/api/tan-query/remixes/useRemixers.ts +++ b/packages/common/src/api/tan-query/remixes/useRemixers.ts @@ -48,7 +48,7 @@ export const useRemixers = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getRemixers({ + const { data = [] } = await sdk.users.getRemixers({ id: Id.parse(userId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/remixes/useRemixersCount.ts b/packages/common/src/api/tan-query/remixes/useRemixersCount.ts index a69ff8e790f..5cf4630644b 100644 --- a/packages/common/src/api/tan-query/remixes/useRemixersCount.ts +++ b/packages/common/src/api/tan-query/remixes/useRemixersCount.ts @@ -27,7 +27,7 @@ export const useRemixersCount = ( queryFn: async () => { const sdk = await audiusSdk() if (!currentUserId) return 0 - const { data = 0 } = await sdk.full.users.getRemixersCount({ + const { data = 0 } = await sdk.users.getRemixersCount({ id: Id.parse(currentUserId), userId: Id.parse(currentUserId), trackId: OptionalId.parse(trackId) diff --git a/packages/common/src/api/tan-query/remixes/useRemixes.ts b/packages/common/src/api/tan-query/remixes/useRemixes.ts index b2feeca056b..6060378b668 100644 --- a/packages/common/src/api/tan-query/remixes/useRemixes.ts +++ b/packages/common/src/api/tan-query/remixes/useRemixes.ts @@ -1,4 +1,5 @@ -import { Id, OptionalId, EntityType, full } from '@audius/sdk' +import { Id, OptionalId, EntityType } from '@audius/sdk' +import type { GetTrackRemixesSortMethodEnum } from '@audius/sdk' import { InfiniteData, useInfiniteQuery, @@ -25,7 +26,7 @@ export type UseRemixesArgs = { includeOriginal?: boolean includeWinners?: boolean pageSize?: number - sortMethod?: full.GetTrackRemixesSortMethodEnum + sortMethod?: GetTrackRemixesSortMethodEnum isCosign?: boolean isContestEntry?: boolean } @@ -100,16 +101,19 @@ export const useRemixes = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = { count: 0, tracks: [] } } = - await sdk.full.tracks.getTrackRemixes({ - trackId: Id.parse(trackId), - userId: OptionalId.parse(currentUserId), - limit: pageSize, - offset: pageParam, - sortMethod, - onlyCosigns: isCosign, - onlyContestEntries: isContestEntry - }) + const remixesRes = await sdk.tracks.getTrackRemixes({ + trackId: Id.parse(trackId), + userId: OptionalId.parse(currentUserId), + limit: pageSize, + offset: pageParam, + sortMethod, + onlyCosigns: isCosign, + onlyContestEntries: isContestEntry + }) + const data = { + count: remixesRes.count ?? 0, + tracks: remixesRes.tracks ?? [] + } let processedTracks = transformAndCleanList( data.tracks, userTrackMetadataFromSDK diff --git a/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts b/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts index f222d8c32a7..e35ba56030a 100644 --- a/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts +++ b/packages/common/src/api/tan-query/search/useSearchAutocomplete.ts @@ -44,7 +44,7 @@ export const useSearchAutocomplete = ( queryKey: getSearchAutocompleteQueryKey(currentUserId, { query, limit }), queryFn: async () => { const sdk = await audiusSdk() - const { data } = await sdk.full.search.searchAutocomplete({ + const { data } = await sdk.search.searchAutocomplete({ userId: OptionalId.parse(currentUserId), query, limit, diff --git a/packages/common/src/api/tan-query/search/useSearchResults.ts b/packages/common/src/api/tan-query/search/useSearchResults.ts index 955dd730e86..d41a86548ee 100644 --- a/packages/common/src/api/tan-query/search/useSearchResults.ts +++ b/packages/common/src/api/tan-query/search/useSearchResults.ts @@ -209,8 +209,8 @@ const useSearchQueryProps = ( } const { data } = isTagsSearch - ? await sdk.full.search.searchTags(searchParams) - : await sdk.full.search.search(searchParams) + ? await sdk.search.searchTags(searchParams) + : await sdk.search.search(searchParams) const { tracks, playlists, albums, users } = searchResultsFromSDK( data, diff --git a/packages/common/src/api/tan-query/tracks/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/tracks/useFeelingLuckyTrack.ts b/packages/common/src/api/tan-query/tracks/useFeelingLuckyTrack.ts index 485d037ff9c..20d89d83759 100644 --- a/packages/common/src/api/tan-query/tracks/useFeelingLuckyTrack.ts +++ b/packages/common/src/api/tan-query/tracks/useFeelingLuckyTrack.ts @@ -39,7 +39,7 @@ export const useFeelingLuckyTracks = ( queryKey: getFeelingLuckyTracksQueryKey({ userId: currentUserId, limit }), queryFn: async () => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.tracks.getFeelingLuckyTracks({ + const { data = [] } = await sdk.tracks.getFeelingLuckyTracks({ limit }) const tracks = transformAndCleanList(data, userTrackMetadataFromSDK) diff --git a/packages/common/src/api/tan-query/tracks/useRecentlyCommentedTracks.ts b/packages/common/src/api/tan-query/tracks/useRecentlyCommentedTracks.ts index cf466c27f19..0894c41c28e 100644 --- a/packages/common/src/api/tan-query/tracks/useRecentlyCommentedTracks.ts +++ b/packages/common/src/api/tan-query/tracks/useRecentlyCommentedTracks.ts @@ -55,7 +55,7 @@ export const useRecentlyCommentedTracks = ( queryFn: async ({ pageParam }) => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data = [] } = await sdk.full.tracks.getTracksWithRecentComments({ + const { data = [] } = await sdk.tracks.getTracksWithRecentComments({ ...args, userId: OptionalId.parse(currentUserId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts b/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts index a82bf2a7512..6914a2da4cc 100644 --- a/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts +++ b/packages/common/src/api/tan-query/tracks/useRecentlyPlayedTracks.ts @@ -53,7 +53,7 @@ export const useRecentlyPlayedTracks = ( if (!currentUserId) return [] const sdk = await audiusSdk() const id = Id.parse(currentUserId) - const { data = [] } = await sdk.full.users.getUsersTrackHistory({ + const { data = [] } = await sdk.users.getUsersTrackHistory({ ...args, id, userId: id, diff --git a/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts b/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts index 38ce48f275f..4987fb8b8b7 100644 --- a/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts +++ b/packages/common/src/api/tan-query/tracks/useRecommendedTracks.ts @@ -53,7 +53,7 @@ export const useRecommendedTracks = ( queryFn: async ({ pageParam }) => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getUserRecommendedTracks({ + const { data = [] } = await sdk.users.getUserRecommendedTracks({ ...args, id: Id.parse(currentUserId), userId: Id.parse(currentUserId), diff --git a/packages/common/src/api/tan-query/tracks/useStems.ts b/packages/common/src/api/tan-query/tracks/useStems.ts index c8ab05b8651..29701dabca5 100644 --- a/packages/common/src/api/tan-query/tracks/useStems.ts +++ b/packages/common/src/api/tan-query/tracks/useStems.ts @@ -31,7 +31,7 @@ export const useStems = ( queryKey: getStemsQueryKey(trackId), queryFn: async () => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.tracks.getTrackStems({ + const { data = [] } = await sdk.tracks.getTrackStems({ trackId: Id.parse(trackId!) }) diff --git a/packages/common/src/api/tan-query/tracks/useTrackByPermalink.ts b/packages/common/src/api/tan-query/tracks/useTrackByPermalink.ts index 988ba364a00..1ffdb657f6b 100644 --- a/packages/common/src/api/tan-query/tracks/useTrackByPermalink.ts +++ b/packages/common/src/api/tan-query/tracks/useTrackByPermalink.ts @@ -43,7 +43,7 @@ export const useTrackByPermalink = ( queryKey: getTrackByPermalinkQueryKey(permalink), queryFn: async () => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.tracks.getBulkTracks({ + const { data = [] } = await sdk.tracks.getBulkTracks({ permalink: [permalink!], userId: OptionalId.parse(currentUserId) }) diff --git a/packages/common/src/api/tan-query/tracks/useTrackFavorites.ts b/packages/common/src/api/tan-query/tracks/useTrackFavorites.ts index 5fa1082a325..0aeb48a9a0d 100644 --- a/packages/common/src/api/tan-query/tracks/useTrackFavorites.ts +++ b/packages/common/src/api/tan-query/tracks/useTrackFavorites.ts @@ -49,7 +49,7 @@ export const useTrackFavorites = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.tracks.getUsersFromFavorites({ + const { data } = await sdk.tracks.getUsersFromFavorites({ trackId: Id.parse(trackId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/tracks/useTrackHistory.ts b/packages/common/src/api/tan-query/tracks/useTrackHistory.ts index 27b3819435f..4a265f04664 100644 --- a/packages/common/src/api/tan-query/tracks/useTrackHistory.ts +++ b/packages/common/src/api/tan-query/tracks/useTrackHistory.ts @@ -67,7 +67,7 @@ export const useTrackHistory = ( const id = Id.parse(currentUserId) - const { data: activityData } = await sdk.full.users.getUsersTrackHistory({ + const { data: activityData } = await sdk.users.getUsersTrackHistory({ id, userId: id, limit: pageSize, diff --git a/packages/common/src/api/tan-query/tracks/useTrackRank.ts b/packages/common/src/api/tan-query/tracks/useTrackRank.ts index 73ca6236267..a8512ea082e 100644 --- a/packages/common/src/api/tan-query/tracks/useTrackRank.ts +++ b/packages/common/src/api/tan-query/tracks/useTrackRank.ts @@ -40,7 +40,7 @@ export const useGetTrendingIds = (args?: GetTrendingIdsArgs) => { queryKey: getTrendingIdsQueryKey(args), queryFn: async () => { const sdk = await audiusSdk() - const { data } = await sdk.full.tracks.getTrendingTrackIDs(args) + const { data } = await sdk.tracks.getTrendingTrackIDs(args) return data ? trendingIdsFromSDK(data) : null } }) diff --git a/packages/common/src/api/tan-query/tracks/useTrackReposts.ts b/packages/common/src/api/tan-query/tracks/useTrackReposts.ts index a87715d61ee..7f02cec58b1 100644 --- a/packages/common/src/api/tan-query/tracks/useTrackReposts.ts +++ b/packages/common/src/api/tan-query/tracks/useTrackReposts.ts @@ -49,7 +49,7 @@ export const useTrackReposts = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.tracks.getUsersFromReposts({ + const { data } = await sdk.tracks.getUsersFromReposts({ trackId: Id.parse(trackId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts b/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts index b7f7f4ff039..12f75079db8 100644 --- a/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts +++ b/packages/common/src/api/tan-query/users/account/useCurrentAccount.ts @@ -70,7 +70,7 @@ export const getCurrentAccountQueryFn = async ( return null } - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet: currentUserWallet! }) diff --git a/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts b/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts index 2d7d6f58120..ad7393c3206 100644 --- a/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts +++ b/packages/common/src/api/tan-query/users/account/useManagedAccounts.ts @@ -26,7 +26,7 @@ export const useManagedAccounts = ( queryKey: getManagedAccountsQueryKey(userId), queryFn: async () => { const sdk = await audiusSdk() - const managedUsers = await sdk.full.users.getManagedUsers({ + const managedUsers = await sdk.users.getManagedUsers({ id: Id.parse(userId) }) const { data = [] } = managedUsers diff --git a/packages/common/src/api/tan-query/users/account/useManagers.ts b/packages/common/src/api/tan-query/users/account/useManagers.ts index 992459f823a..7b2351f72dc 100644 --- a/packages/common/src/api/tan-query/users/account/useManagers.ts +++ b/packages/common/src/api/tan-query/users/account/useManagers.ts @@ -24,7 +24,7 @@ export const useManagers = ( queryKey: getManagersQueryKey(userId), queryFn: async () => { const sdk = await audiusSdk() - const managers = await sdk.full.users.getManagers({ + const managers = await sdk.users.getManagers({ id: Id.parse(userId) }) const { data: rawData = [] } = managers diff --git a/packages/common/src/api/tan-query/users/account/useWalletUser.ts b/packages/common/src/api/tan-query/users/account/useWalletUser.ts index efea2a534b0..bcfb4e04d7d 100644 --- a/packages/common/src/api/tan-query/users/account/useWalletUser.ts +++ b/packages/common/src/api/tan-query/users/account/useWalletUser.ts @@ -33,7 +33,7 @@ export const getWalletAccountQueryFn = async ( sdk: AudiusSdk, queryClient: QueryClient ) => { - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet }) diff --git a/packages/common/src/api/tan-query/users/useFollowers.ts b/packages/common/src/api/tan-query/users/useFollowers.ts index daf4cbcc937..c8d91b499e5 100644 --- a/packages/common/src/api/tan-query/users/useFollowers.ts +++ b/packages/common/src/api/tan-query/users/useFollowers.ts @@ -49,7 +49,7 @@ export const useFollowers = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.users.getFollowers({ + const { data } = await sdk.users.getFollowers({ id: Id.parse(userId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/users/useFollowing.ts b/packages/common/src/api/tan-query/users/useFollowing.ts index d8254fc91c2..7a80cc0348c 100644 --- a/packages/common/src/api/tan-query/users/useFollowing.ts +++ b/packages/common/src/api/tan-query/users/useFollowing.ts @@ -48,7 +48,7 @@ export const useFollowing = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getFollowing({ + const { data = [] } = await sdk.users.getFollowing({ id: Id.parse(userId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/users/useHandleInUse.ts b/packages/common/src/api/tan-query/users/useHandleInUse.ts index 54c9c10bec7..0bf95e160d6 100644 --- a/packages/common/src/api/tan-query/users/useHandleInUse.ts +++ b/packages/common/src/api/tan-query/users/useHandleInUse.ts @@ -14,10 +14,8 @@ export const fetchHandleInUse = async ( if (!handle) return false const sdk = await audiusSdk() try { - const { data: users = [] } = await sdk.full.users.getUserByHandle({ - handle - }) - return !isEmpty(users[0]) + const { data } = await sdk.users.getUserByHandle({ handle }) + return !isEmpty(data) } catch (e: any) { if ('response' in e && e.response.status === 404) { // Expect not found when handle is available diff --git a/packages/common/src/api/tan-query/users/useMutedUsers.ts b/packages/common/src/api/tan-query/users/useMutedUsers.ts index 984932f7fc1..39fa4aec49d 100644 --- a/packages/common/src/api/tan-query/users/useMutedUsers.ts +++ b/packages/common/src/api/tan-query/users/useMutedUsers.ts @@ -36,7 +36,7 @@ export const useMutedUsers = ( queryFn: async () => { if (!currentUserId) return [] const sdk = await audiusSdk() - const { data } = await sdk.full.users.getMutedUsers({ + const { data } = await sdk.users.getMutedUsers({ id: Id.parse(currentUserId) }) const users = userMetadataListFromSDK(data) diff --git a/packages/common/src/api/tan-query/users/useMutualFollowers.ts b/packages/common/src/api/tan-query/users/useMutualFollowers.ts index e838ab1e3b6..c0be0e10e60 100644 --- a/packages/common/src/api/tan-query/users/useMutualFollowers.ts +++ b/packages/common/src/api/tan-query/users/useMutualFollowers.ts @@ -47,7 +47,7 @@ export const useMutualFollowers = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getMutualFollowers({ + const { data = [] } = await sdk.users.getMutualFollowers({ userId: OptionalId.parse(currentUserId), id: Id.parse(userId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/users/useRelatedArtists.ts b/packages/common/src/api/tan-query/users/useRelatedArtists.ts index ae70e43ee32..fb46a1f90ab 100644 --- a/packages/common/src/api/tan-query/users/useRelatedArtists.ts +++ b/packages/common/src/api/tan-query/users/useRelatedArtists.ts @@ -55,7 +55,7 @@ export const useRelatedArtists = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getRelatedUsers({ + const { data = [] } = await sdk.users.getRelatedUsers({ id: Id.parse(artistId), limit: pageSize, offset: pageParam, diff --git a/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts b/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts index 7435d1c307d..893891cade8 100644 --- a/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts +++ b/packages/common/src/api/tan-query/users/useTopArtistsInGenre.ts @@ -51,7 +51,7 @@ export const useTopArtistsInGenre = ( }, queryFn: async ({ pageParam }) => { const sdk = await audiusSdk() - const { data } = await sdk.full.users.getTopUsersInGenre({ + const { data } = await sdk.users.getTopUsersInGenre({ genre: [genre], limit: pageSize, offset: (pageParam as number) * pageSize diff --git a/packages/common/src/api/tan-query/users/useUpdateProfile.ts b/packages/common/src/api/tan-query/users/useUpdateProfile.ts index df0ebef56c3..89450afd2ac 100644 --- a/packages/common/src/api/tan-query/users/useUpdateProfile.ts +++ b/packages/common/src/api/tan-query/users/useUpdateProfile.ts @@ -1,7 +1,7 @@ import { Id } from '@audius/sdk' import { useMutation, useQueryClient } from '@tanstack/react-query' -import { userMetadataToSdk } from '~/adapters/user' +import { userMetadataFromSDK, userMetadataToSdk } from '~/adapters/user' import { primeUserData, useQueryContext } from '~/api/tan-query/utils' import { Feature } from '~/models/ErrorReporting' import { UserMetadata, WriteableUserMetadata } from '~/models/User' @@ -64,12 +64,19 @@ export const useUpdateProfile = () => { } // Fetch updated user data - const { data: userData = [] } = await sdk.full.users.getUser({ + const { data } = await sdk.users.getUser({ id: Id.parse(currentUserId), userId: Id.parse(currentUserId) }) - - return userData[0] + const user = data ? userMetadataFromSDK(data) : undefined + if (user) { + primeUserData({ + queryClient, + users: [user], + forceReplace: true + }) + } + return user }, onMutate: async (metadata): Promise => { // Cancel any outgoing refetches diff --git a/packages/common/src/api/tan-query/users/useUserAlbums.ts b/packages/common/src/api/tan-query/users/useUserAlbums.ts index 47ccd06c6b1..966b62abb9f 100644 --- a/packages/common/src/api/tan-query/users/useUserAlbums.ts +++ b/packages/common/src/api/tan-query/users/useUserAlbums.ts @@ -1,4 +1,5 @@ -import { full, Id, OptionalId } from '@audius/sdk' +import { Id, OptionalId } from '@audius/sdk' +import type { GetAlbumsByUserSortMethodEnum } from '@audius/sdk' import { InfiniteData, useInfiniteQuery, @@ -21,7 +22,7 @@ import { useCurrentUserId } from './account/useCurrentUserId' type GetAlbumsOptions = { userId: number | null | undefined pageSize?: number - sortMethod?: full.GetAlbumsByUserSortMethodEnum + sortMethod?: GetAlbumsByUserSortMethodEnum query?: string } @@ -58,7 +59,7 @@ export const useUserAlbums = ( const sdk = await audiusSdk() - const { data } = await sdk.full.users.getAlbumsByUser({ + const { data } = await sdk.users.getAlbumsByUser({ id: Id.parse(userId), userId: OptionalId.parse(currentUserId), limit: pageSize, diff --git a/packages/common/src/api/tan-query/users/useUserByHandle.ts b/packages/common/src/api/tan-query/users/useUserByHandle.ts index b2a96565d12..d941c28a701 100644 --- a/packages/common/src/api/tan-query/users/useUserByHandle.ts +++ b/packages/common/src/api/tan-query/users/useUserByHandle.ts @@ -2,7 +2,7 @@ import { AudiusSdk, OptionalId } from '@audius/sdk' import { QueryClient, useQuery, useQueryClient } from '@tanstack/react-query' import { omit } from 'lodash' -import { userMetadataListFromSDK } from '~/adapters/user' +import { userMetadataFromSDK } from '~/adapters/user' import { useQueryContext } from '~/api/tan-query/utils' import { ID } from '~/models/Identifiers' import { User } from '~/models/User' @@ -29,12 +29,12 @@ export const getUserByHandleQueryFn = async ( currentUserId?: ID | null ) => { if (!handle) return undefined - const { data } = await sdk.full.users.getUserByHandle({ + const { data } = await sdk.users.getUserByHandle({ handle: handle.toLowerCase(), userId: OptionalId.parse(currentUserId) }) - const user = userMetadataListFromSDK(data)[0] - + const user = data ? userMetadataFromSDK(data) : null + if (!user) return undefined primeUserData({ users: [user], queryClient }) return user.user_id } diff --git a/packages/common/src/api/tan-query/users/useUserPlaylists.ts b/packages/common/src/api/tan-query/users/useUserPlaylists.ts index 96e223ce4d6..6270cfc8a1c 100644 --- a/packages/common/src/api/tan-query/users/useUserPlaylists.ts +++ b/packages/common/src/api/tan-query/users/useUserPlaylists.ts @@ -1,4 +1,5 @@ -import { Id, OptionalId, full } from '@audius/sdk' +import { Id, OptionalId } from '@audius/sdk' +import type { GetPlaylistsByUserSortMethodEnum } from '@audius/sdk' import { InfiniteData, useInfiniteQuery, @@ -21,7 +22,7 @@ import { useCurrentUserId } from './account/useCurrentUserId' type GetPlaylistsOptions = { userId: number | null | undefined pageSize?: number - sortMethod?: full.GetPlaylistsByUserSortMethodEnum + sortMethod?: GetPlaylistsByUserSortMethodEnum query?: string } @@ -58,7 +59,7 @@ export const useUserPlaylists = ( const sdk = await audiusSdk() - const { data } = await sdk.full.users.getPlaylistsByUser({ + const playlistsRes = await sdk.users.getPlaylistsByUser({ id: Id.parse(userId), userId: OptionalId.parse(currentUserId), limit: pageSize, @@ -66,6 +67,7 @@ export const useUserPlaylists = ( sortMethod, query }) + const data = playlistsRes?.data ?? [] const collections = transformAndCleanList( data, diff --git a/packages/common/src/api/tan-query/users/useUserTracksByHandle.ts b/packages/common/src/api/tan-query/users/useUserTracksByHandle.ts index 5cc496cb69f..788a051423e 100644 --- a/packages/common/src/api/tan-query/users/useUserTracksByHandle.ts +++ b/packages/common/src/api/tan-query/users/useUserTracksByHandle.ts @@ -51,7 +51,7 @@ export const useUserTracksByHandle = ( queryKey: getUserTracksByHandleQueryKey(args), queryFn: async () => { const sdk = await audiusSdk() - const { data = [] } = await sdk.full.users.getTracksByUserHandle({ + const { data = [] } = await sdk.users.getTracksByUserHandle({ handle: handle!, userId: OptionalId.parse(currentUserId), filterTracks, diff --git a/packages/common/src/hooks/chats/useAudiusLinkResolver.ts b/packages/common/src/hooks/chats/useAudiusLinkResolver.ts index c78e0edaa4a..420e0f14266 100644 --- a/packages/common/src/hooks/chats/useAudiusLinkResolver.ts +++ b/packages/common/src/hooks/chats/useAudiusLinkResolver.ts @@ -140,12 +140,12 @@ export const useAudiusLinkResolver = ({ data: res.data[0] } } else if (instanceOfUserResponse(res)) { - const human = formatUserName({ user: res.data }) + const human = formatUserName({ user: res.data[0] }) linkToHuman[match] = human humanToData[human] = { link: match, type: 'user', - data: res.data + data: res.data[0] } } } diff --git a/packages/common/src/services/explore/Explore.ts b/packages/common/src/services/explore/Explore.ts index 7009e111efd..26994078a76 100644 --- a/packages/common/src/services/explore/Explore.ts +++ b/packages/common/src/services/explore/Explore.ts @@ -22,7 +22,7 @@ export class Explore { async getFeelingLuckyTracks(userId: ID | null | undefined, limit = 25) { try { const sdk = await this.audiusSdk() - const { data = [] } = await sdk.full.tracks.getFeelingLuckyTracks({ + const { data = [] } = await sdk.tracks.getFeelingLuckyTracks({ limit, withUsers: true, userId: OptionalId.parse(userId) diff --git a/packages/common/src/store/account/sagas.ts b/packages/common/src/store/account/sagas.ts index 997e5e9cf85..beaef5b4241 100644 --- a/packages/common/src/store/account/sagas.ts +++ b/packages/common/src/store/account/sagas.ts @@ -66,7 +66,7 @@ function* handleFetchTrackCount() { try { const { data = [] } = yield* call( - [sdk.full.users, sdk.full.users.getTracksByUserHandle], + [sdk.users, sdk.users.getTracksByUserHandle], { handle, userId: Id.parse(currentUserId), diff --git a/packages/common/src/store/gated-content/sagas.ts b/packages/common/src/store/gated-content/sagas.ts index db4a5770638..2ddf010b6af 100644 --- a/packages/common/src/store/gated-content/sagas.ts +++ b/packages/common/src/store/gated-content/sagas.ts @@ -2,7 +2,6 @@ import { Id, OptionalId } from '@audius/sdk' import { takeEvery, call, put, delay, all } from 'typed-redux-saga' import { - transformAndCleanList, userCollectionMetadataFromSDK, userTrackMetadataFromSDK } from '~/adapters' @@ -78,14 +77,15 @@ export function* pollGatedContent({ while (true) { const apiEntity = isAlbum ? yield* call(async () => { - const { data = [] } = await sdk.full.playlists.getPlaylist({ + const playlistRes = await sdk.playlists.getPlaylist({ playlistId: Id.parse(contentId), userId: OptionalId.parse(currentUserId) }) - return transformAndCleanList(data, userCollectionMetadataFromSDK)[0] + const playlist = playlistRes?.data?.[0] + return playlist ? userCollectionMetadataFromSDK(playlist) : null }) : yield* call(async () => { - const { data } = await sdk.full.tracks.getTrack({ + const { data } = await sdk.tracks.getTrack({ trackId: Id.parse(contentId), userId: OptionalId.parse(currentUserId) }) diff --git a/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts b/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts index e35a778e566..8f9f16e0b9e 100644 --- a/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts +++ b/packages/common/src/store/playlist-updates/playlistUpdatesSagas.ts @@ -26,7 +26,7 @@ function* fetchPlaylistUpdatesWorker() { const existingUpdatesTotal = yield* select(selectPlaylistUpdatesTotal) const { data } = yield* call( - [sdk.full.notifications, sdk.full.notifications.getPlaylistUpdates], + [sdk.notifications, sdk.notifications.getPlaylistUpdates], { userId: Id.parse(currentUserId) } ) diff --git a/packages/common/src/store/purchase-content/sagas.ts b/packages/common/src/store/purchase-content/sagas.ts index 9d60bfa999f..30aace203a4 100644 --- a/packages/common/src/store/purchase-content/sagas.ts +++ b/packages/common/src/store/purchase-content/sagas.ts @@ -292,13 +292,10 @@ function* pollForPurchaseConfirmation({ ) { const sdk = yield* getSDK() for (const trackId of metadata.playlist_contents.track_ids) { - const { data } = yield* call( - [sdk.full.tracks, sdk.full.tracks.getTrack], - { - trackId: Id.parse(trackId.track), - userId: OptionalId.parse(currentUserId) - } - ) + const { data } = yield* call([sdk.tracks, sdk.tracks.getTrack], { + trackId: Id.parse(trackId.track), + userId: OptionalId.parse(currentUserId) + }) const track = data ? userTrackMetadataFromSDK(data) : null if (track) { @@ -601,13 +598,10 @@ function* collectEmailAfterPurchase({ return } - const { data: managers } = yield* call( - [sdk.full.users, sdk.full.users.getManagers], - { - id: Id.parse(sellerId), - isApproved: true - } - ) + const { data: managers } = yield* call([sdk.users, sdk.users.getManagers], { + id: Id.parse(sellerId), + isApproved: true + }) const grantees = managers?.map((m) => m.manager.id) diff --git a/packages/common/src/store/ui/search-users-modal/sagas.ts b/packages/common/src/store/ui/search-users-modal/sagas.ts index 2d00d8091d8..667460568d5 100644 --- a/packages/common/src/store/ui/search-users-modal/sagas.ts +++ b/packages/common/src/store/ui/search-users-modal/sagas.ts @@ -18,7 +18,7 @@ function* doSearchUsers(action: ReturnType) { const userList = yield* select(getUserList) try { const currentUserId = yield* call(queryCurrentUserId) - const { data } = yield* call([sdk.full.search, sdk.full.search.search], { + const { data } = yield* call([sdk.search, sdk.search.search], { query, limit, kind: SearchKind.USERS, diff --git a/packages/common/src/store/ui/share-modal/sagas.ts b/packages/common/src/store/ui/share-modal/sagas.ts index 265d80ccb1c..cd258534953 100644 --- a/packages/common/src/store/ui/share-modal/sagas.ts +++ b/packages/common/src/store/ui/share-modal/sagas.ts @@ -1,11 +1,7 @@ import { Id } from '@audius/sdk' import { takeEvery, put, call } from 'typed-redux-saga' -import { - userCollectionMetadataFromSDK, - userMetadataFromSDK, - transformAndCleanList -} from '~/adapters' +import { userCollectionMetadataFromSDK, userMetadataFromSDK } from '~/adapters' import { queryCollection, queryTrack, queryUser } from '~/api' import { TQCollection } from '~/api/tan-query/models' import { getSDK } from '~/store/sdkUtils' @@ -39,16 +35,15 @@ function* handleRequestOpen(action: ShareModalRequestOpenAction) { let collection = yield* queryCollection(collectionId) if (!collection) { - const { data = [] } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + const playlistRes = yield* call( + [sdk.playlists, sdk.playlists.getPlaylist], { playlistId: Id.parse(collectionId) } ) - const [transformedCollection] = transformAndCleanList( - data, - userCollectionMetadataFromSDK - ) + const transformedCollection = playlistRes?.data?.[0] + ? userCollectionMetadataFromSDK(playlistRes.data[0]) + : null if (transformedCollection) { collection = transformedCollection as unknown as TQCollection } @@ -57,13 +52,12 @@ function* handleRequestOpen(action: ShareModalRequestOpenAction) { let owner = yield* queryUser(collection.playlist_owner_id) if (!owner) { - const { data } = yield* call([sdk.full.users, sdk.full.users.getUser], { + const userRes = yield* call([sdk.users, sdk.users.getUser], { id: Id.parse(collection.playlist_owner_id) }) - const [transformedUser] = transformAndCleanList( - data ?? [], - userMetadataFromSDK - ) + const transformedUser = userRes?.data + ? userMetadataFromSDK(userRes.data) + : null if (transformedUser) { owner = transformedUser } diff --git a/packages/common/src/utils/coinMetrics.ts b/packages/common/src/utils/coinMetrics.ts index fab505a6d2a..fa94228ed27 100644 --- a/packages/common/src/utils/coinMetrics.ts +++ b/packages/common/src/utils/coinMetrics.ts @@ -77,11 +77,11 @@ export const createCoinMetrics = (coin: Coin): MetricData[] => { 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/common/tsconfig.json b/packages/common/tsconfig.json index 997baf94ce1..3edd909ebe6 100644 --- a/packages/common/tsconfig.json +++ b/packages/common/tsconfig.json @@ -12,7 +12,7 @@ "module": "esnext", "target": "es6", "moduleResolution": "node", - "lib": ["es6", "dom", "es2016", "es2017", "es2021"], + "lib": ["es6", "dom", "es2016", "es2017", "es2021", "es2022"], "sourceMap": true, "allowJs": true, "jsx": "react-jsx", 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..51f8e52399b 100644 --- a/packages/mobile/src/screens/buy-sell-screen/useBuySellFlow.tsx +++ b/packages/mobile/src/screens/buy-sell-screen/useBuySellFlow.tsx @@ -242,7 +242,7 @@ export const useBuySellFlow = ({ const pricePerBaseToken = useMemo(() => { return outputCoin?.price ? outputCoin?.price - : (outputCoin?.dynamicBondingCurve.priceUSD ?? 0) + : (outputCoin?.dynamicBondingCurve?.priceUSD ?? 0) }, [outputCoin]) const handleContinueClick = useCallback(() => { diff --git a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts index 18c4eea2cf8..fe385b1daba 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadCollectionWorker.ts @@ -1,7 +1,4 @@ -import { - transformAndCleanList, - userCollectionMetadataFromSDK -} from '@audius/common/adapters' +import { userCollectionMetadataFromSDK } from '@audius/common/adapters' import { queryCurrentUserId } from '@audius/common/api' import type { CollectionMetadata, @@ -123,17 +120,12 @@ function* downloadCollectionAsync( if (!currentUserId) return OfflineDownloadStatus.ERROR const sdk = yield* getSDK() - const { data = [] } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], - { - playlistId: Id.parse(collectionId), - userId: OptionalId.parse(currentUserId) - } - ) - const [collection] = transformAndCleanList( - data, - userCollectionMetadataFromSDK - ) + const playlistRes = yield* call([sdk.playlists, sdk.playlists.getPlaylist], { + playlistId: Id.parse(collectionId), + userId: OptionalId.parse(currentUserId) + }) + const playlist = playlistRes?.data?.[0] + const collection = playlist ? userCollectionMetadataFromSDK(playlist) : null if (!collection) return OfflineDownloadStatus.ERROR diff --git a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadTrackWorker.ts b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadTrackWorker.ts index 2eb656417a6..a37f21d3806 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadTrackWorker.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/downloadTrackWorker.ts @@ -120,7 +120,7 @@ function* downloadTrackAsync( if (!currentUserId) return OfflineDownloadStatus.ERROR const sdk = yield* getSDK() - const { data } = yield* call([sdk.full.tracks, sdk.full.tracks.getTrack], { + const { data } = yield* call([sdk.tracks, sdk.tracks.getTrack], { trackId: Id.parse(trackId), userId: OptionalId.parse(currentUserId) }) diff --git a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/staleTrackWorker.ts b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/staleTrackWorker.ts index 2a9e7f784fe..40c72822b09 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/staleTrackWorker.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/offlineQueueSagas/workers/staleTrackWorker.ts @@ -55,7 +55,7 @@ export function* handleStaleTrack(trackId: ID) { if (!currentTrack || !currentUserId) return OfflineDownloadStatus.ERROR - const { data } = yield* call([sdk.full.tracks, sdk.full.tracks.getTrack], { + const { data } = yield* call([sdk.tracks, sdk.tracks.getTrack], { trackId: Id.parse(trackId), userId: OptionalId.parse(currentUserId) }) 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..f60542278cb 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,7 +85,7 @@ 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) }) @@ -153,13 +153,11 @@ function* syncCollection(collectionId: ID) { const sdk = yield* getSDK() - const { data = [] } = yield* call( - [sdk.playlists, sdk.playlists.getPlaylist], - { - playlistId: Id.parse(collectionId), - userId: OptionalId.parse(currentUserId) - } - ) + const playlistRes = yield* call([sdk.playlists, sdk.playlists.getPlaylist], { + playlistId: Id.parse(collectionId), + userId: OptionalId.parse(currentUserId) + }) + const data = playlistRes?.data ?? [] const [latestCollection] = transformAndCleanList( data, userCollectionMetadataFromSDK diff --git a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts index b6193d8cb6e..9700e632b1a 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadAllFavoritesSaga.ts @@ -59,7 +59,7 @@ 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) }) const allFavoritedTracks = transformAndCleanList(data, favoriteFromSDK) diff --git a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts index 172a2e2dcbc..894ce477246 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadCollectionSaga.ts @@ -1,7 +1,4 @@ -import { - transformAndCleanList, - userCollectionMetadataFromSDK -} from '@audius/common/adapters' +import { userCollectionMetadataFromSDK } from '@audius/common/adapters' import { queryCurrentUserId } from '@audius/common/api' import { FavoriteSource } from '@audius/common/models' import { collectionsSocialActions, getSDK } from '@audius/common/store' @@ -34,17 +31,12 @@ function* downloadCollection(action: CollectionAction) { const sdk = yield* getSDK() - const { data = [] } = yield* call( - [sdk.playlists, sdk.full.playlists.getPlaylist], - { - playlistId: Id.parse(collectionId), - userId: OptionalId.parse(currentUserId) - } - ) - const [collection] = transformAndCleanList( - data, - userCollectionMetadataFromSDK - ) + const playlistRes = yield* call([sdk.playlists, sdk.playlists.getPlaylist], { + playlistId: Id.parse(collectionId), + userId: OptionalId.parse(currentUserId) + }) + const playlist = playlistRes?.data?.[0] + const collection = playlist ? userCollectionMetadataFromSDK(playlist) : null if (!collection) return diff --git a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadFavoritedCollectionSaga.ts b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadFavoritedCollectionSaga.ts index dd43e3a9bda..d77291f70fc 100644 --- a/packages/mobile/src/store/offline-downloads/sagas/requestDownloadFavoritedCollectionSaga.ts +++ b/packages/mobile/src/store/offline-downloads/sagas/requestDownloadFavoritedCollectionSaga.ts @@ -25,13 +25,11 @@ function* downloadFavoritedCollection(action: CollectionAction) { const sdk = yield* getSDK() - const { data = [] } = yield* call( - [sdk.playlists, sdk.playlists.getPlaylist], - { - playlistId: Id.parse(collectionId), - userId: OptionalId.parse(currentUserId) - } - ) + const playlistRes = yield* call([sdk.playlists, sdk.playlists.getPlaylist], { + playlistId: Id.parse(collectionId), + userId: OptionalId.parse(currentUserId) + }) + const data = playlistRes?.data ?? [] const [collection] = transformAndCleanList( data, userCollectionMetadataFromSDK diff --git a/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts b/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts index 3b5d376831b..36faae33983 100644 --- a/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts +++ b/packages/sdk/src/sdk/api/albums/AlbumsApi.test.ts @@ -95,6 +95,13 @@ vitest .spyOn(GeneratedPlaylistsApi.prototype, 'getPlaylist') .mockImplementation(async () => { return { + latestChainBlock: 1, + latestIndexedBlock: 1, + latestChainSlotPlays: 1, + latestIndexedSlotPlays: 1, + signature: '', + timestamp: '', + version: { service: 'test', version: '1' }, data: [ { playlistName: 'test', 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 03c4b835dc7..1696cda4f4c 100644 --- a/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES +++ b/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES @@ -1,26 +1,55 @@ .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 index.ts models/Access.ts +models/AccessGate.ts models/AccessInfoResponse.ts +models/Account.ts +models/AccountCollection.ts +models/AccountCollectionUser.ts +models/AccountFull.ts models/Activity.ts +models/ActivityFull.ts models/AlbumBacklink.ts models/AlbumsResponse.ts +models/AlbumsResponseFull.ts +models/AnnouncementNotification.ts +models/AnnouncementNotificationAction.ts +models/AnnouncementNotificationActionData.ts +models/ApproveManagerRequestNotification.ts +models/ApproveManagerRequestNotificationAction.ts +models/ApproveManagerRequestNotificationActionData.ts +models/ArtistRemixContestEndedNotification.ts +models/ArtistRemixContestEndedNotificationAction.ts +models/ArtistRemixContestEndedNotificationActionData.ts +models/ArtistRemixContestEndingSoonNotification.ts +models/ArtistRemixContestEndingSoonNotificationAction.ts +models/ArtistRemixContestEndingSoonNotificationActionData.ts +models/ArtistRemixContestSubmissionsNotification.ts +models/ArtistRemixContestSubmissionsNotificationAction.ts +models/ArtistRemixContestSubmissionsNotificationActionData.ts +models/Attestation.ts +models/AttestationReponse.ts models/AuthorizedApp.ts models/AuthorizedApps.ts models/BalanceHistoryDataPoint.ts @@ -28,18 +57,28 @@ 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/ClaimRewardsRequest.ts models/ClaimRewardsResponse.ts models/ClaimRewardsResponseDataInner.ts +models/ClaimableRewardNotification.ts +models/ClaimableRewardNotificationAction.ts +models/ClaimableRewardNotificationActionData.ts models/ClaimedPrize.ts models/ClaimedPrizesResponse.ts models/Coin.ts 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 @@ -52,21 +91,48 @@ models/CoinsVolumeLeadersResponseDataInner.ts models/Collectibles.ts models/CollectiblesResponse.ts models/CollectionActivity.ts +models/CollectionActivityFullWithoutTracks.ts +models/CollectionActivityWithoutTracks.ts +models/CollectionLibraryResponse.ts +models/CollectionLibraryResponseFull.ts models/Comment.ts models/CommentMention.ts +models/CommentMentionNotification.ts +models/CommentMentionNotificationAction.ts +models/CommentMentionNotificationActionData.ts +models/CommentNotification.ts +models/CommentNotificationAction.ts +models/CommentNotificationActionData.ts models/CommentNotificationSetting.ts +models/CommentReactionNotification.ts +models/CommentReactionNotificationAction.ts +models/CommentReactionNotificationActionData.ts models/CommentRepliesResponse.ts models/CommentResponse.ts +models/CommentThreadNotification.ts +models/CommentThreadNotificationAction.ts +models/CommentThreadNotificationActionData.ts models/ConnectedWallets.ts models/ConnectedWalletsResponse.ts +models/CosignNotification.ts +models/CosignNotificationAction.ts +models/CosignNotificationActionData.ts +models/CoverArt.ts models/CoverPhoto.ts +models/CoverPhotoFull.ts models/CreateCoinRequest.ts models/CreateCoinResponse.ts models/CreateCoinResponseData.ts +models/CreateNotification.ts +models/CreateNotificationAction.ts +models/CreateNotificationActionData.ts +models/CreatePlaylistNotificationActionData.ts models/CreateRewardCodeRequest.ts models/CreateRewardCodeResponse.ts +models/CreateTrackNotificationActionData.ts models/DashboardWalletUser.ts models/DashboardWalletUsersResponse.ts +models/DataAndType.ts models/DecodedUserToken.ts models/DeveloperApp.ts models/DeveloperAppResponse.ts @@ -80,41 +146,135 @@ models/ExtendedPaymentSplit.ts models/ExtendedPurchaseGate.ts models/ExtendedTokenGate.ts models/ExtendedUsdcGate.ts +models/FanRemixContestEndedNotification.ts +models/FanRemixContestEndedNotificationAction.ts +models/FanRemixContestEndedNotificationActionData.ts +models/FanRemixContestEndingSoonNotification.ts +models/FanRemixContestEndingSoonNotificationAction.ts +models/FanRemixContestEndingSoonNotificationActionData.ts +models/FanRemixContestStartedNotification.ts +models/FanRemixContestStartedNotificationAction.ts +models/FanRemixContestStartedNotificationActionData.ts +models/FanRemixContestWinnersSelectedNotification.ts +models/FanRemixContestWinnersSelectedNotificationAction.ts +models/FanRemixContestWinnersSelectedNotificationActionData.ts models/Favorite.ts models/FavoritesResponse.ts +models/FieldVisibility.ts models/FollowGate.ts +models/FollowNotification.ts +models/FollowNotificationAction.ts +models/FollowNotificationActionData.ts models/FollowersResponse.ts models/FollowingResponse.ts +models/FollowingResponseFull.ts +models/FullFollowersResponse.ts +models/FullGetSupportedUsers.ts +models/FullGetSupporter.ts +models/FullGetSupporters.ts +models/FullGetSupporting.ts +models/FullMutualFollowersResponse.ts +models/FullPurchasersResponse.ts +models/FullRemix.ts +models/FullRemixParent.ts +models/FullRemixersResponse.ts +models/FullSubscribersResponse.ts +models/FullSupporter.ts +models/FullSupporting.ts +models/FullTip.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/HistoryResponseFull.ts models/ListenCount.ts +models/ListenStreakReminderNotification.ts +models/ListenStreakReminderNotificationAction.ts +models/ListenStreakReminderNotificationActionData.ts +models/ManagedUser.ts +models/ManagedUsersResponse.ts +models/ManagersResponse.ts +models/MediaLink.ts +models/MilestoneNotification.ts +models/MilestoneNotificationAction.ts +models/MilestoneNotificationActionData.ts models/MonthlyAggregatePlay.ts models/MutualFollowersResponse.ts models/NftCollection.ts models/NftGate.ts +models/Notification.ts +models/Notifications.ts +models/NotificationsResponse.ts models/Playlist.ts models/PlaylistAddedTimestamp.ts models/PlaylistArtwork.ts +models/PlaylistArtworkFull.ts +models/PlaylistFeedItem.ts +models/PlaylistFull.ts +models/PlaylistFullWithoutTracks.ts +models/PlaylistLibrary.ts +models/PlaylistMilestoneNotificationActionData.ts models/PlaylistResponse.ts models/PlaylistSearchResult.ts models/PlaylistTracksResponse.ts +models/PlaylistUpdate.ts +models/PlaylistUpdates.ts +models/PlaylistUpdatesResponse.ts +models/PlaylistWithoutTracks.ts models/PlaylistsResponse.ts +models/PlaylistsResponseFull.ts models/PrizeClaimRequest.ts models/PrizeClaimResponse.ts models/PrizePublic.ts models/PrizesResponse.ts models/ProfilePicture.ts +models/ProfilePictureFull.ts +models/Purchase.ts +models/PurchaseGate.ts +models/PurchaseSplit.ts +models/PurchasersCountResponse.ts models/PurchasersResponse.ts +models/PurchasesCountResponse.ts +models/PurchasesResponse.ts +models/Reaction.ts +models/ReactionNotification.ts +models/ReactionNotificationAction.ts +models/ReactionNotificationActionData.ts +models/Reactions.ts +models/ReceiveTipNotification.ts +models/ReceiveTipNotificationAction.ts +models/ReceiveTipNotificationActionData.ts models/RedeemAmountResponse.ts +models/Related.ts models/RelatedArtistResponse.ts +models/RelatedArtistResponseFull.ts +models/Remix.ts +models/RemixNotification.ts +models/RemixNotificationAction.ts +models/RemixNotificationActionData.ts models/RemixParent.ts +models/RemixablesResponse.ts models/RemixedTrackAggregate.ts +models/RemixersCountResponse.ts models/RemixersResponse.ts +models/RemixesResponse.ts +models/RemixingResponse.ts models/ReplyComment.ts +models/Repost.ts +models/RepostNotification.ts +models/RepostNotificationAction.ts +models/RepostNotificationActionData.ts +models/RepostOfRepostNotification.ts +models/RepostOfRepostNotificationAction.ts +models/RepostOfRepostNotificationActionData.ts models/Reposts.ts +models/RequestManagerNotification.ts +models/RequestManagerNotificationAction.ts +models/RequestManagerNotificationActionData.ts models/RewardCodeErrorResponse.ts models/RewardCodeResponse.ts models/SaleJson.ts @@ -122,50 +282,136 @@ 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/SearchPlaylistFull.ts +models/SearchResponse.ts +models/SearchTrack.ts +models/SearchTrackFull.ts +models/SendTipNotification.ts +models/SendTipNotificationAction.ts +models/SendTipNotificationActionData.ts models/Stem.ts +models/StemFull.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/TopUsersResponseFull.ts models/Track.ts models/TrackAccessInfo.ts models/TrackActivity.ts +models/TrackActivityFull.ts +models/TrackAddedToPlaylistNotification.ts +models/TrackAddedToPlaylistNotificationAction.ts +models/TrackAddedToPlaylistNotificationActionData.ts +models/TrackAddedToPurchasedAlbumNotification.ts +models/TrackAddedToPurchasedAlbumNotificationAction.ts +models/TrackAddedToPurchasedAlbumNotificationActionData.ts models/TrackArtwork.ts +models/TrackArtworkFull.ts models/TrackCommentCountResponse.ts models/TrackCommentNotificationResponse.ts models/TrackCommentsResponse.ts models/TrackElement.ts +models/TrackFavoritesResponse.ts +models/TrackFeedItem.ts +models/TrackFull.ts +models/TrackId.ts models/TrackInspect.ts models/TrackInspectList.ts +models/TrackLibraryResponse.ts +models/TrackLibraryResponseFull.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/UpdateCoinRequest.ts models/UpdateCoinResponse.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/UserCommentsResponseFull.ts +models/UserFeedItem.ts +models/UserFeedResponse.ts +models/UserFull.ts models/UserIdAddress.ts models/UserIdsAddressesResponse.ts +models/UserManager.ts +models/UserMilestoneNotificationActionData.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/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 af966b2c1cd..b5fee049630 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/CoinsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/CoinsApi.ts @@ -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; } @@ -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); @@ -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 bfa99560fc0..21c2f3f6d99 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/PlaylistsApi.ts @@ -17,6 +17,7 @@ import * as runtime from '../runtime'; import type { AccessInfoResponse, + FollowingResponse, PlaylistResponse, PlaylistSearchResult, PlaylistTracksResponse, @@ -25,6 +26,8 @@ import type { import { AccessInfoResponseFromJSON, AccessInfoResponseToJSON, + FollowingResponseFromJSON, + FollowingResponseToJSON, PlaylistResponseFromJSON, PlaylistResponseToJSON, PlaylistSearchResultFromJSON, @@ -64,11 +67,34 @@ export interface GetPlaylistTracksRequest { export interface GetTrendingPlaylistsRequest { offset?: number; limit?: number; + userId?: string; time?: GetTrendingPlaylistsTimeEnum; type?: GetTrendingPlaylistsTypeEnum; 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 SearchPlaylistsRequest { offset?: number; limit?: number; @@ -266,7 +292,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 = {}; @@ -279,6 +305,10 @@ export class PlaylistsApi extends runtime.BaseAPI { queryParameters['limit'] = params.limit; } + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + if (params.time !== undefined) { queryParameters['time'] = params.time; } @@ -304,13 +334,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 * Search for a playlist @@ -390,6 +553,16 @@ export const GetTrendingPlaylistsTypeEnum = { Album: 'album' } as const; export type GetTrendingPlaylistsTypeEnum = typeof GetTrendingPlaylistsTypeEnum[keyof typeof GetTrendingPlaylistsTypeEnum]; +/** + * @export + */ +export const GetTrendingPlaylistsWithVersionTimeEnum = { + Week: 'week', + Month: 'month', + Year: 'year', + AllTime: 'allTime' +} as const; +export type GetTrendingPlaylistsWithVersionTimeEnum = typeof GetTrendingPlaylistsWithVersionTimeEnum[keyof typeof GetTrendingPlaylistsWithVersionTimeEnum]; /** * @export */ diff --git a/packages/sdk/src/sdk/api/generated/default/apis/ReactionsApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/ReactionsApi.ts new file mode 100644 index 00000000000..387c70e358f --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/apis/ReactionsApi.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +// @ts-nocheck +/* eslint-disable */ +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Reactions, +} from '../models'; +import { + ReactionsFromJSON, + ReactionsToJSON, +} from '../models'; + +export interface BulkGetReactionsRequest { + reactedToIds: Array; + type?: string; +} + +/** + * + */ +export class ReactionsApi extends runtime.BaseAPI { + + /** + * @hidden + * Gets reactions by reacted_to_id and type + */ + async bulkGetReactionsRaw(params: BulkGetReactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.reactedToIds === null || params.reactedToIds === undefined) { + throw new runtime.RequiredError('reactedToIds','Required parameter params.reactedToIds was null or undefined when calling bulkGetReactions.'); + } + + const queryParameters: any = {}; + + if (params.type !== undefined) { + queryParameters['type'] = params.type; + } + + if (params.reactedToIds) { + queryParameters['reacted_to_ids'] = params.reactedToIds.join(runtime.COLLECTION_FORMATS["csv"]); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/reactions`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReactionsFromJSON(jsonValue)); + } + + /** + * Gets reactions by reacted_to_id and type + */ + async bulkGetReactions(params: BulkGetReactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.bulkGetReactionsRaw(params, initOverrides); + return await response.value(); + } + +} diff --git a/packages/sdk/src/sdk/api/generated/default/apis/SearchApi.ts b/packages/sdk/src/sdk/api/generated/default/apis/SearchApi.ts new file mode 100644 index 00000000000..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 ef1c7417336..199c3b3a71b 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/TracksApi.ts @@ -17,21 +17,33 @@ import * as runtime from '../runtime'; import type { AccessInfoResponse, + RemixablesResponse, + RemixesResponse, + RemixingResponse, StemsResponse, StreamUrlResponse, TopListener, TrackCommentCountResponse, TrackCommentNotificationResponse, TrackCommentsResponse, + TrackFavoritesResponse, TrackInspect, TrackInspectList, + TrackRepostsResponse, TrackResponse, TrackSearch, TracksResponse, + TrendingIdsResponse, } from '../models'; import { AccessInfoResponseFromJSON, AccessInfoResponseToJSON, + RemixablesResponseFromJSON, + RemixablesResponseToJSON, + RemixesResponseFromJSON, + RemixesResponseToJSON, + RemixingResponseFromJSON, + RemixingResponseToJSON, StemsResponseFromJSON, StemsResponseToJSON, StreamUrlResponseFromJSON, @@ -44,16 +56,22 @@ import { TrackCommentNotificationResponseToJSON, TrackCommentsResponseFromJSON, TrackCommentsResponseToJSON, + TrackFavoritesResponseFromJSON, + TrackFavoritesResponseToJSON, TrackInspectFromJSON, TrackInspectToJSON, TrackInspectListFromJSON, TrackInspectListToJSON, + TrackRepostsResponseFromJSON, + TrackRepostsResponseToJSON, TrackResponseFromJSON, TrackResponseToJSON, TrackSearchFromJSON, TrackSearchToJSON, TracksResponseFromJSON, TracksResponseToJSON, + TrendingIdsResponseFromJSON, + TrendingIdsResponseToJSON, } from '../models'; export interface DownloadTrackRequest { @@ -65,7 +83,15 @@ export interface DownloadTrackRequest { filename?: string; } +export interface GetBestNewReleasesRequest { + window: GetBestNewReleasesWindowEnum; + userId?: string; + limit?: number; + withUsers?: boolean; +} + export interface GetBulkTracksRequest { + userId?: string; permalink?: Array; id?: Array; isrc?: Array; @@ -74,9 +100,16 @@ export interface GetBulkTracksRequest { export interface GetFeelingLuckyTracksRequest { userId?: string; limit?: number; + withUsers?: boolean; minFollowers?: number; } +export interface GetMostLovedTracksRequest { + userId?: string; + limit?: number; + withUsers?: boolean; +} + export interface GetMostSharedTracksRequest { userId?: string; limit?: number; @@ -90,8 +123,32 @@ export interface GetRecentPremiumTracksRequest { userId?: string; } +export interface GetRecommendedTracksRequest { + limit?: number; + genre?: string; + time?: GetRecommendedTracksTimeEnum; + exclusionList?: Array; + userId?: string; +} + +export interface GetRecommendedTracksWithVersionRequest { + version: string; + limit?: number; + genre?: string; + time?: GetRecommendedTracksWithVersionTimeEnum; + exclusionList?: Array; + userId?: string; +} + +export interface GetRemixableTracksRequest { + limit?: number; + userId?: string; + withUsers?: boolean; +} + export interface GetTrackRequest { trackId: string; + userId?: string; } export interface GetTrackAccessInfoRequest { @@ -117,6 +174,23 @@ export interface GetTrackCommentsRequest { sortMethod?: GetTrackCommentsSortMethodEnum; } +export interface GetTrackRemixParentsRequest { + trackId: string; + offset?: number; + limit?: number; + userId?: string; +} + +export interface GetTrackRemixesRequest { + trackId: string; + offset?: number; + limit?: number; + userId?: string; + sortMethod?: GetTrackRemixesSortMethodEnum; + onlyCosigns?: boolean; + onlyContestEntries?: boolean; +} + export interface GetTrackStemsRequest { trackId: string; } @@ -134,16 +208,87 @@ export interface GetTracksWithRecentCommentsRequest { offset?: number; } +export interface GetTrendingTrackIDsRequest { + offset?: number; + limit?: number; + genre?: string; +} + export interface GetTrendingTracksRequest { offset?: number; limit?: number; + userId?: string; genre?: string; time?: GetTrendingTracksTimeEnum; } +export interface GetTrendingTracksIDsWithVersionRequest { + version: string; + offset?: number; + limit?: number; + genre?: string; +} + +export interface GetTrendingTracksWithVersionRequest { + version: string; + offset?: number; + limit?: number; + userId?: string; + genre?: string; + time?: GetTrendingTracksWithVersionTimeEnum; +} + +export interface GetTrendingUSDCPurchaseTracksRequest { + offset?: number; + limit?: number; + userId?: string; + genre?: string; + time?: GetTrendingUSDCPurchaseTracksTimeEnum; +} + +export interface GetTrendingUSDCPurchaseTracksWithVersionRequest { + version: string; + offset?: number; + limit?: number; + userId?: string; + genre?: string; + time?: GetTrendingUSDCPurchaseTracksWithVersionTimeEnum; +} + +export interface GetUnderTheRadarTracksRequest { + offset?: number; + limit?: number; + userId?: string; + filter?: GetUnderTheRadarTracksFilterEnum; + tracksOnly?: boolean; + withUsers?: boolean; +} + export interface GetUndergroundTrendingTracksRequest { offset?: number; limit?: number; + userId?: string; +} + +export interface GetUndergroundTrendingTracksWithVersionRequest { + version: string; + offset?: number; + limit?: number; + userId?: string; +} + +export interface GetUsersFromFavoritesRequest { + trackId: string; + offset?: number; + limit?: number; + userId?: string; +} + +export interface GetUsersFromRepostsRequest { + trackId: string; + offset?: number; + limit?: number; + userId?: string; } export interface InspectTrackRequest { @@ -242,6 +387,53 @@ export class TracksApi extends runtime.BaseAPI { await this.downloadTrackRaw(params, initOverrides); } + /** + * @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 @@ -249,6 +441,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; } @@ -296,6 +492,10 @@ export class TracksApi extends runtime.BaseAPI { queryParameters['limit'] = params.limit; } + if (params.withUsers !== undefined) { + queryParameters['with_users'] = params.withUsers; + } + if (params.minFollowers !== undefined) { queryParameters['min_followers'] = params.minFollowers; } @@ -320,6 +520,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 @@ -404,147 +643,773 @@ export class TracksApi extends runtime.BaseAPI { /** * @hidden - * Gets a track by ID + * Get recommended tracks */ - async getTrackRaw(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.trackId === null || params.trackId === undefined) { - throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrack.'); + async getRecommendedTracksRaw(params: GetRecommendedTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.genre !== undefined) { + queryParameters['genre'] = params.genre; + } + + if (params.time !== undefined) { + queryParameters['time'] = params.time; + } + + if (params.exclusionList) { + queryParameters['exclusion_list'] = params.exclusionList; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/recommended`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + } + + /** + * Get recommended tracks + */ + async getRecommendedTracks(params: GetRecommendedTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRecommendedTracksRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get recommended tracks using the given trending strategy version + */ + async getRecommendedTracksWithVersionRaw(params: GetRecommendedTracksWithVersionRequest, 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 getRecommendedTracksWithVersion.'); + } + + const queryParameters: any = {}; + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.genre !== undefined) { + queryParameters['genre'] = params.genre; + } + + if (params.time !== undefined) { + queryParameters['time'] = params.time; + } + + if (params.exclusionList) { + queryParameters['exclusion_list'] = params.exclusionList; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/recommended/{version}`.replace(`{${"version"}}`, encodeURIComponent(String(params.version))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + } + + /** + * Get recommended tracks using the given trending strategy version + */ + async getRecommendedTracksWithVersion(params: GetRecommendedTracksWithVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRecommendedTracksWithVersionRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a list of tracks that have stems available for remixing + */ + async getRemixableTracksRaw(params: GetRemixableTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.withUsers !== undefined) { + queryParameters['with_users'] = params.withUsers; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/remixables`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RemixablesResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of tracks that have stems available for remixing + */ + async getRemixableTracks(params: GetRemixableTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRemixableTracksRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a track by ID. + */ + async getTrackRaw(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrack.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrackResponseFromJSON(jsonValue)); + } + + /** + * Gets a track by ID. + */ + async getTrack(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the information necessary to access the track and what access the given user has. + */ + async getTrackAccessInfoRaw(params: GetTrackAccessInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackAccessInfo.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/access-info`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AccessInfoResponseFromJSON(jsonValue)); + } + + /** + * Gets the information necessary to access the track and what access the given user has. + */ + async getTrackAccessInfo(params: GetTrackAccessInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackAccessInfoRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the comment count for a track + */ + async getTrackCommentCountRaw(params: GetTrackCommentCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackCommentCount.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/comment_count`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrackCommentCountResponseFromJSON(jsonValue)); + } + + /** + * Get the comment count for a track + */ + async getTrackCommentCount(params: GetTrackCommentCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackCommentCountRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the comment notification setting for a track + */ + async getTrackCommentNotificationSettingRaw(params: GetTrackCommentNotificationSettingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackCommentNotificationSetting.'); + } + + const queryParameters: any = {}; + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/comment_notification_setting`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrackCommentNotificationResponseFromJSON(jsonValue)); + } + + /** + * Get the comment notification setting for a track + */ + async getTrackCommentNotificationSetting(params: GetTrackCommentNotificationSettingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackCommentNotificationSettingRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get a list of comments for a track + */ + async getTrackCommentsRaw(params: GetTrackCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackComments.'); + } + + 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.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/comments`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrackCommentsResponseFromJSON(jsonValue)); + } + + /** + * Get a list of comments for a track + */ + async getTrackComments(params: GetTrackCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackCommentsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets all the tracks that the given track remixes + */ + async getTrackRemixParentsRaw(params: GetTrackRemixParentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackRemixParents.'); + } + + 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: `/tracks/{track_id}/remixing`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RemixingResponseFromJSON(jsonValue)); + } + + /** + * Gets all the tracks that the given track remixes + */ + async getTrackRemixParents(params: GetTrackRemixParentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackRemixParentsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get all tracks that remix the given track + */ + async getTrackRemixesRaw(params: GetTrackRemixesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackRemixes.'); + } + + 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.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.onlyCosigns !== undefined) { + queryParameters['only_cosigns'] = params.onlyCosigns; + } + + if (params.onlyContestEntries !== undefined) { + queryParameters['only_contest_entries'] = params.onlyContestEntries; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/remixes`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RemixesResponseFromJSON(jsonValue)); + } + + /** + * Get all tracks that remix the given track + */ + async getTrackRemixes(params: GetTrackRemixesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackRemixesRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the remixable stems of a track + */ + async getTrackStemsRaw(params: GetTrackStemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackStems.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/{track_id}/stems`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StemsResponseFromJSON(jsonValue)); + } + + /** + * Get the remixable stems of a track + */ + async getTrackStems(params: GetTrackStemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackStemsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the users that have listened to a track the most + */ + async getTrackTopListenersRaw(params: GetTrackTopListenersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackTopListeners.'); + } + + 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: `/tracks/{track_id}/top_listeners`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopListenerFromJSON(jsonValue)); + } + + /** + * Get the users that have listened to a track the most + */ + async getTrackTopListeners(params: GetTrackTopListenersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackTopListenersRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the most recent tracks with active discussion + */ + async getTracksWithRecentCommentsRaw(params: GetTracksWithRecentCommentsRequest, 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.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/recent-comments`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + } + + /** + * Gets the most recent tracks with active discussion + */ + async getTracksWithRecentComments(params: GetTracksWithRecentCommentsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTracksWithRecentCommentsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the track IDs of the top trending tracks on Audius + */ + async getTrendingTrackIDsRaw(params: GetTrendingTrackIDsRequest, 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 !== undefined) { + queryParameters['genre'] = params.genre; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tracks/trending/ids`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrendingIdsResponseFromJSON(jsonValue)); + } + + /** + * Gets the track IDs of the top trending tracks on Audius + */ + async getTrendingTrackIDs(params: GetTrendingTrackIDsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrendingTrackIDsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets the top 100 trending (most popular) tracks on Audius + */ + async getTrendingTracksRaw(params: GetTrendingTracksRequest, 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.genre !== undefined) { + queryParameters['genre'] = params.genre; } - const queryParameters: any = {}; + if (params.time !== undefined) { + queryParameters['time'] = params.time; + } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/{track_id}`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + path: `/tracks/trending`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TrackResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); } /** - * Gets a track by ID + * Gets the top 100 trending (most popular) tracks on Audius */ - async getTrack(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackRaw(params, initOverrides); + async getTrendingTracks(params: GetTrendingTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrendingTracksRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the information necessary to access the track and what access the given user has. + * Gets the track IDs of the top trending tracks on Audius based on the given trending strategy version */ - async getTrackAccessInfoRaw(params: GetTrackAccessInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.trackId === null || params.trackId === undefined) { - throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackAccessInfo.'); + async getTrendingTracksIDsWithVersionRaw(params: GetTrendingTracksIDsWithVersionRequest, 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 getTrendingTracksIDsWithVersion.'); } const queryParameters: any = {}; - if (params.userId !== undefined) { - queryParameters['user_id'] = params.userId; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.genre !== undefined) { + queryParameters['genre'] = params.genre; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/{track_id}/access-info`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + path: `/tracks/trending/ids/{version}`.replace(`{${"version"}}`, encodeURIComponent(String(params.version))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => AccessInfoResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TrendingIdsResponseFromJSON(jsonValue)); } /** - * Gets the information necessary to access the track and what access the given user has. + * Gets the track IDs of the top trending tracks on Audius based on the given trending strategy version */ - async getTrackAccessInfo(params: GetTrackAccessInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackAccessInfoRaw(params, initOverrides); + async getTrendingTracksIDsWithVersion(params: GetTrendingTracksIDsWithVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrendingTracksIDsWithVersionRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the comment count for a track + * Gets the top 100 trending (most popular) tracks on Audius using a given trending strategy version */ - async getTrackCommentCountRaw(params: GetTrackCommentCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.trackId === null || params.trackId === undefined) { - throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackCommentCount.'); + async getTrendingTracksWithVersionRaw(params: GetTrendingTracksWithVersionRequest, 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 getTrendingTracksWithVersion.'); } 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.genre !== undefined) { + queryParameters['genre'] = params.genre; + } + + if (params.time !== undefined) { + queryParameters['time'] = params.time; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/{track_id}/comment_count`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + path: `/tracks/trending/{version}`.replace(`{${"version"}}`, encodeURIComponent(String(params.version))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TrackCommentCountResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); } /** - * Get the comment count for a track + * Gets the top 100 trending (most popular) tracks on Audius using a given trending strategy version */ - async getTrackCommentCount(params: GetTrackCommentCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackCommentCountRaw(params, initOverrides); + async getTrendingTracksWithVersion(params: GetTrendingTracksWithVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrendingTracksWithVersionRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the comment notification setting for a track + * Gets the top trending (most popular) USDC purchase tracks on Audius */ - async getTrackCommentNotificationSettingRaw(params: GetTrackCommentNotificationSettingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.trackId === null || params.trackId === undefined) { - throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackCommentNotificationSetting.'); + async getTrendingUSDCPurchaseTracksRaw(params: GetTrendingUSDCPurchaseTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; } - const queryParameters: any = {}; + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } if (params.userId !== undefined) { queryParameters['user_id'] = params.userId; } + if (params.genre !== undefined) { + queryParameters['genre'] = params.genre; + } + + if (params.time !== undefined) { + queryParameters['time'] = params.time; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/{track_id}/comment_notification_setting`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + path: `/tracks/usdc-purchase`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TrackCommentNotificationResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); } /** - * Get the comment notification setting for a track + * Gets the top trending (most popular) USDC purchase tracks on Audius */ - async getTrackCommentNotificationSetting(params: GetTrackCommentNotificationSettingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackCommentNotificationSettingRaw(params, initOverrides); + async getTrendingUSDCPurchaseTracks(params: GetTrendingUSDCPurchaseTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrendingUSDCPurchaseTracksRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get a list of comments for a track + * Gets the top trending (most popular) USDC purchase tracks on Audius using a given trending strategy version */ - async getTrackCommentsRaw(params: GetTrackCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.trackId === null || params.trackId === undefined) { - throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackComments.'); + async getTrendingUSDCPurchaseTracksWithVersionRaw(params: GetTrendingUSDCPurchaseTracksWithVersionRequest, 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 getTrendingUSDCPurchaseTracksWithVersion.'); } const queryParameters: any = {}; @@ -561,70 +1426,90 @@ export class TracksApi extends runtime.BaseAPI { queryParameters['user_id'] = params.userId; } - if (params.sortMethod !== undefined) { - queryParameters['sort_method'] = params.sortMethod; + if (params.genre !== undefined) { + queryParameters['genre'] = params.genre; + } + + if (params.time !== undefined) { + queryParameters['time'] = params.time; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/{track_id}/comments`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + path: `/tracks/usdc-purchase/{version}`.replace(`{${"version"}}`, encodeURIComponent(String(params.version))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TrackCommentsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); } /** - * Get a list of comments for a track + * Gets the top trending (most popular) USDC purchase tracks on Audius using a given trending strategy version */ - async getTrackComments(params: GetTrackCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackCommentsRaw(params, initOverrides); + async getTrendingUSDCPurchaseTracksWithVersion(params: GetTrendingUSDCPurchaseTracksWithVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrendingUSDCPurchaseTracksWithVersionRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the remixable stems of a track + * Gets the tracks found on the \"Under the Radar\" smart playlist */ - async getTrackStemsRaw(params: GetTrackStemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.trackId === null || params.trackId === undefined) { - throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackStems.'); + async getUnderTheRadarTracksRaw(params: GetUnderTheRadarTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; } - const queryParameters: any = {}; + 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/{track_id}/stems`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + path: `/tracks/under_the_radar`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => StemsResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); } /** - * Get the remixable stems of a track + * Gets the tracks found on the \"Under the Radar\" smart playlist */ - async getTrackStems(params: GetTrackStemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackStemsRaw(params, initOverrides); + async getUnderTheRadarTracks(params: GetUnderTheRadarTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUnderTheRadarTracksRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the users that have listened to a track the most + * Gets the top 100 trending underground tracks on Audius */ - async getTrackTopListenersRaw(params: GetTrackTopListenersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.trackId === null || params.trackId === undefined) { - throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getTrackTopListeners.'); - } - + async getUndergroundTrendingTracksRaw(params: GetUndergroundTrendingTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; if (params.offset !== undefined) { @@ -642,46 +1527,50 @@ export class TracksApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/{track_id}/top_listeners`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), + path: `/tracks/trending/underground`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TopListenerFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); } /** - * Get the users that have listened to a track the most + * Gets the top 100 trending underground tracks on Audius */ - async getTrackTopListeners(params: GetTrackTopListenersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackTopListenersRaw(params, initOverrides); + async getUndergroundTrendingTracks(params: GetUndergroundTrendingTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUndergroundTrendingTracksRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the most recent tracks with active discussion + * Gets the top 100 trending underground tracks on Audius using a given trending strategy version */ - async getTracksWithRecentCommentsRaw(params: GetTracksWithRecentCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getUndergroundTrendingTracksWithVersionRaw(params: GetUndergroundTrendingTracksWithVersionRequest, 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 getUndergroundTrendingTracksWithVersion.'); + } + const queryParameters: any = {}; - if (params.userId !== undefined) { - queryParameters['user_id'] = params.userId; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; } if (params.limit !== undefined) { queryParameters['limit'] = params.limit; } - if (params.offset !== undefined) { - queryParameters['offset'] = params.offset; + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/recent-comments`, + path: `/tracks/trending/underground/{version}`.replace(`{${"version"}}`, encodeURIComponent(String(params.version))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -691,18 +1580,22 @@ export class TracksApi extends runtime.BaseAPI { } /** - * Gets the most recent tracks with active discussion + * Gets the top 100 trending underground tracks on Audius using a given trending strategy version */ - async getTracksWithRecentComments(params: GetTracksWithRecentCommentsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTracksWithRecentCommentsRaw(params, initOverrides); + async getUndergroundTrendingTracksWithVersion(params: GetUndergroundTrendingTracksWithVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUndergroundTrendingTracksWithVersionRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the top 100 trending (most popular) tracks on Audius + * Get users that favorited a track */ - async getTrendingTracksRaw(params: GetTrendingTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getUsersFromFavoritesRaw(params: GetUsersFromFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getUsersFromFavorites.'); + } + const queryParameters: any = {}; if (params.offset !== undefined) { @@ -713,39 +1606,39 @@ export class TracksApi extends runtime.BaseAPI { queryParameters['limit'] = params.limit; } - if (params.genre !== undefined) { - queryParameters['genre'] = params.genre; - } - - if (params.time !== undefined) { - queryParameters['time'] = params.time; + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/trending`, + path: `/tracks/{track_id}/favorites`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TrackFavoritesResponseFromJSON(jsonValue)); } /** - * Gets the top 100 trending (most popular) tracks on Audius + * Get users that favorited a track */ - async getTrendingTracks(params: GetTrendingTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrendingTracksRaw(params, initOverrides); + async getUsersFromFavorites(params: GetUsersFromFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUsersFromFavoritesRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets the top 100 trending underground tracks on Audius + * Get the users that reposted a track */ - async getUndergroundTrendingTracksRaw(params: GetUndergroundTrendingTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getUsersFromRepostsRaw(params: GetUsersFromRepostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.trackId === null || params.trackId === undefined) { + throw new runtime.RequiredError('trackId','Required parameter params.trackId was null or undefined when calling getUsersFromReposts.'); + } + const queryParameters: any = {}; if (params.offset !== undefined) { @@ -756,23 +1649,27 @@ export class TracksApi extends runtime.BaseAPI { queryParameters['limit'] = params.limit; } + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/tracks/trending/underground`, + path: `/tracks/{track_id}/reposts`.replace(`{${"track_id"}}`, encodeURIComponent(String(params.trackId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TracksResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => TrackRepostsResponseFromJSON(jsonValue)); } /** - * Gets the top 100 trending underground tracks on Audius + * Get the users that reposted a track */ - async getUndergroundTrendingTracks(params: GetUndergroundTrendingTracksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUndergroundTrendingTracksRaw(params, initOverrides); + async getUsersFromReposts(params: GetUsersFromRepostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUsersFromRepostsRaw(params, initOverrides); return await response.value(); } @@ -1004,6 +1901,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 */ @@ -1013,6 +1919,26 @@ export const GetMostSharedTracksTimeRangeEnum = { AllTime: 'allTime' } as const; export type GetMostSharedTracksTimeRangeEnum = typeof GetMostSharedTracksTimeRangeEnum[keyof typeof GetMostSharedTracksTimeRangeEnum]; +/** + * @export + */ +export const GetRecommendedTracksTimeEnum = { + Week: 'week', + Month: 'month', + Year: 'year', + AllTime: 'allTime' +} as const; +export type GetRecommendedTracksTimeEnum = typeof GetRecommendedTracksTimeEnum[keyof typeof GetRecommendedTracksTimeEnum]; +/** + * @export + */ +export const GetRecommendedTracksWithVersionTimeEnum = { + Week: 'week', + Month: 'month', + Year: 'year', + AllTime: 'allTime' +} as const; +export type GetRecommendedTracksWithVersionTimeEnum = typeof GetRecommendedTracksWithVersionTimeEnum[keyof typeof GetRecommendedTracksWithVersionTimeEnum]; /** * @export */ @@ -1022,6 +1948,15 @@ export const GetTrackCommentsSortMethodEnum = { Timestamp: 'timestamp' } as const; export type GetTrackCommentsSortMethodEnum = typeof GetTrackCommentsSortMethodEnum[keyof typeof GetTrackCommentsSortMethodEnum]; +/** + * @export + */ +export const GetTrackRemixesSortMethodEnum = { + Likes: 'likes', + Plays: 'plays', + Recent: 'recent' +} as const; +export type GetTrackRemixesSortMethodEnum = typeof GetTrackRemixesSortMethodEnum[keyof typeof GetTrackRemixesSortMethodEnum]; /** * @export */ @@ -1032,6 +1967,45 @@ export const GetTrendingTracksTimeEnum = { AllTime: 'allTime' } as const; export type GetTrendingTracksTimeEnum = typeof GetTrendingTracksTimeEnum[keyof typeof GetTrendingTracksTimeEnum]; +/** + * @export + */ +export const GetTrendingTracksWithVersionTimeEnum = { + Week: 'week', + Month: 'month', + Year: 'year', + AllTime: 'allTime' +} as const; +export type GetTrendingTracksWithVersionTimeEnum = typeof GetTrendingTracksWithVersionTimeEnum[keyof typeof GetTrendingTracksWithVersionTimeEnum]; +/** + * @export + */ +export const GetTrendingUSDCPurchaseTracksTimeEnum = { + Week: 'week', + Month: 'month', + Year: 'year', + AllTime: 'allTime' +} as const; +export type GetTrendingUSDCPurchaseTracksTimeEnum = typeof GetTrendingUSDCPurchaseTracksTimeEnum[keyof typeof GetTrendingUSDCPurchaseTracksTimeEnum]; +/** + * @export + */ +export const GetTrendingUSDCPurchaseTracksWithVersionTimeEnum = { + Week: 'week', + Month: 'month', + Year: 'year', + 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 15cfed14f00..e2346599c6e 100644 --- a/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts +++ b/packages/sdk/src/sdk/api/generated/default/apis/UsersApi.ts @@ -19,7 +19,9 @@ import type { AlbumsResponse, AuthorizedApps, BalanceHistoryResponse, + BulkSubscribersResponse, CollectiblesResponse, + CollectionLibraryResponse, ConnectedWalletsResponse, DeveloperApps, EmailAccessResponse, @@ -28,28 +30,44 @@ 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, - TracksResponse, + TopGenreUsersResponse, + TopUsersResponse, + TrackLibraryResponse, + Tracks, + TracksCountResponse, + TransactionHistoryCountResponse, + TransactionHistoryResponse, + UserAccountResponse, UserCoinResponse, UserCoinsResponse, UserCommentsResponse, + UserFeedResponse, UserIdsAddressesResponse, UserResponse, + UserResponseSingle, UserSearch, UserTrackListenCountsResponse, UserTracksRemixedResponse, - UsersResponse, VerifyToken, } from '../models'; import { @@ -59,8 +77,12 @@ import { AuthorizedAppsToJSON, BalanceHistoryResponseFromJSON, BalanceHistoryResponseToJSON, + BulkSubscribersResponseFromJSON, + BulkSubscribersResponseToJSON, CollectiblesResponseFromJSON, CollectiblesResponseToJSON, + CollectionLibraryResponseFromJSON, + CollectionLibraryResponseToJSON, ConnectedWalletsResponseFromJSON, ConnectedWalletsResponseToJSON, DeveloperAppsFromJSON, @@ -77,18 +99,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, @@ -101,30 +139,54 @@ import { SubscribersResponseToJSON, TagsResponseFromJSON, TagsResponseToJSON, - TracksResponseFromJSON, - TracksResponseToJSON, + TopGenreUsersResponseFromJSON, + TopGenreUsersResponseToJSON, + TopUsersResponseFromJSON, + TopUsersResponseToJSON, + TrackLibraryResponseFromJSON, + TrackLibraryResponseToJSON, + TracksFromJSON, + TracksToJSON, + TracksCountResponseFromJSON, + TracksCountResponseToJSON, + TransactionHistoryCountResponseFromJSON, + TransactionHistoryCountResponseToJSON, + TransactionHistoryResponseFromJSON, + TransactionHistoryResponseToJSON, + 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, } from '../models'; +export interface BulkGetSubscribersRequest { + ids: Array; +} + +export interface BulkGetSubscribersViaJSONRequestRequest { + ids: Array; +} + export interface DownloadPurchasesAsCSVRequest { id: string; userId?: string; @@ -179,6 +241,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; } @@ -196,10 +274,6 @@ export interface GetDeveloperAppsRequest { id: string; } -export interface GetFavoritesRequest { - id: string; -} - export interface GetFollowersRequest { id: string; offset?: number; @@ -214,6 +288,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; @@ -247,6 +337,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; @@ -263,6 +382,12 @@ export interface GetRemixersRequest { trackId?: string; } +export interface GetRemixersCountRequest { + id: string; + userId?: string; + trackId?: string; +} + export interface GetRepostsRequest { id: string; offset?: number; @@ -270,6 +395,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; @@ -279,6 +423,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; @@ -290,12 +442,26 @@ export interface GetSupportedUsersRequest { id: string; offset?: number; limit?: number; + userId?: string; +} + +export interface GetSupporterRequest { + id: string; + supporterUserId: string; + userId?: string; } export interface GetSupportersRequest { id: string; offset?: number; limit?: number; + userId?: string; +} + +export interface GetSupportingRequest { + id: string; + supportedUserId: string; + userId?: string; } export interface GetTopTrackTagsRequest { @@ -304,6 +470,18 @@ export interface GetTopTrackTagsRequest { 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; @@ -319,8 +497,60 @@ export interface GetTracksByUserRequest { encodedDataSignature?: string; } +export interface GetTracksByUserHandleRequest { + handle: string; + offset?: number; + limit?: number; + userId?: string; + sort?: GetTracksByUserHandleSortEnum; + query?: string; + sortMethod?: GetTracksByUserHandleSortMethodEnum; + sortDirection?: GetTracksByUserHandleSortDirectionEnum; + filterTracks?: GetTracksByUserHandleFilterTracksEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; +} + +export interface GetTracksCountByUserRequest { + id: string; + userId?: string; + filterTracks?: GetTracksCountByUserFilterTracksEnum; + gateCondition?: Array; + encodedDataMessage?: string; + 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 { @@ -370,10 +600,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; @@ -425,6 +721,76 @@ export interface VerifyIDTokenRequest { */ export class UsersApi extends runtime.BaseAPI { + /** + * @hidden + * All users that subscribe to the provided users + */ + async bulkGetSubscribersRaw(params: BulkGetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.ids === null || params.ids === undefined) { + throw new runtime.RequiredError('ids','Required parameter params.ids was null or undefined when calling bulkGetSubscribers.'); + } + + const queryParameters: any = {}; + + if (params.ids) { + queryParameters['ids'] = params.ids.join(runtime.COLLECTION_FORMATS["csv"]); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/users/subscribers`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => 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 * Downloads the purchases the user has made as a CSV file @@ -602,7 +968,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.'); } @@ -658,13 +1024,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(); } @@ -730,77 +1096,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 = {}; @@ -808,30 +1202,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 the developer apps that the user owns + * Gets a list of users by ID */ - async getDeveloperAppsRaw(params: GetDeveloperAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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 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 getDeveloperApps.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getConnectedWallets.'); } const queryParameters: any = {}; @@ -839,30 +1268,30 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/developer_apps`.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) => DeveloperAppsFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectedWalletsResponseFromJSON(jsonValue)); } /** - * Gets the developer apps that the user owns + * Get the User\'s ERC and SPL connected wallets */ - async getDeveloperApps(params: GetDeveloperAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDeveloperAppsRaw(params, initOverrides); + async getConnectedWallets(params: GetConnectedWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConnectedWalletsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets a user\'s favorite tracks + * Gets the developer apps that the user owns */ - async getFavoritesRaw(params: GetFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getDeveloperAppsRaw(params: GetDeveloperAppsRequest, 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 getDeveloperApps.'); } const queryParameters: any = {}; @@ -870,20 +1299,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}/developer_apps`.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) => DeveloperAppsFromJSON(jsonValue)); } /** - * Gets a user\'s favorite tracks + * Gets the developer apps that the user owns */ - async getFavorites(params: GetFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFavoritesRaw(params, initOverrides); + async getDeveloperApps(params: GetDeveloperAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDeveloperAppsRaw(params, initOverrides); return await response.value(); } @@ -973,11 +1402,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.'); } @@ -1001,13 +1524,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(); } @@ -1167,11 +1690,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 = {}; @@ -1188,37 +1711,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 = {}; @@ -1235,80 +1762,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 = {}; @@ -1325,41 +1872,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 = {}; @@ -1376,72 +1919,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.userId !== undefined) { + queryParameters['user_id'] = params.userId; } - if (params.limit !== undefined) { - queryParameters['limit'] = params.limit; + 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 = {}; @@ -1454,38 +2001,45 @@ export class UsersApi extends runtime.BaseAPI { 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}/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; } @@ -1497,31 +2051,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 = {}; @@ -1538,14 +2091,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; } @@ -1554,12 +2099,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 = {}; @@ -1573,81 +2114,93 @@ 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 a single user by their user ID + * Gets the aggregated sales data for the user */ - async getUserRaw(params: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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 getUser.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSalesAggregate.'); } 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 = {}; + 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}`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/sales/aggregate`.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) => SalesAggregateResponseFromJSON(jsonValue)); } /** - * Gets a single user by their user ID + * Gets the aggregated sales data for the user */ - async getUser(params: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserRaw(params, initOverrides); + async getSalesAggregate(params: GetSalesAggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSalesAggregateRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the user\'s historical portfolio balance data + * Gets the count of sales the user has made */ - async getUserBalanceHistoryRaw(params: GetUserBalanceHistoryRequest, 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 getUserBalanceHistory.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSalesCount.'); } 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; } + if (params.contentIds) { + queryParameters['content_ids'] = params.contentIds; + } + const headerParameters: runtime.HTTPHeaders = {}; if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { @@ -1659,34 +2212,42 @@ export class UsersApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/users/{id}/balance/history`.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) => BalanceHistoryResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PurchasesCountResponseFromJSON(jsonValue)); } /** - * Get the user\'s historical portfolio balance data + * Gets the count of sales the user has made */ - async getUserBalanceHistory(params: GetUserBalanceHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserBalanceHistoryRaw(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 handle + * All users that subscribe to the provided 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 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 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; } @@ -1694,100 +2255,112 @@ 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}/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 handle + * All users that subscribe to the provided user */ - async getUserByHandle(params: GetUserByHandleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserByHandleRaw(params, initOverrides); + async getSubscribers(params: GetSubscribersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSubscribersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets all challenges for the given user + * Gets the users that the given user supports */ - async getUserChallengesRaw(params: GetUserChallengesRequest, 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 getUserChallenges.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupportedUsers.'); } 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}/supporting`.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) => GetSupportedUsersFromJSON(jsonValue)); } /** - * Gets all challenges for the given user + * Gets the users that the given user supports */ - async getUserChallenges(params: GetUserChallengesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserChallengesRaw(params, initOverrides); + async getSupportedUsers(params: GetSupportedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupportedUsersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets information about a specific coin owned by the user and their wallets + * Gets the specified supporter of the given user */ - async getUserCoinRaw(params: GetUserCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + 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 getUserCoin.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupporter.'); } - 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.supporterUserId === null || params.supporterUserId === undefined) { + throw new runtime.RequiredError('supporterUserId','Required parameter params.supporterUserId was null or undefined when calling getSupporter.'); } 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}/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) => UserCoinResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => GetSupporterFromJSON(jsonValue)); } /** - * Gets information about a specific coin owned by the user and their wallets + * Gets the specified supporter of the given user */ - async getUserCoin(params: GetUserCoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCoinRaw(params, initOverrides); + async getSupporter(params: GetSupporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupporterRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets a list of the coins owned by the user and their balances + * Gets the supporters of the given user */ - async getUserCoinsRaw(params: GetUserCoinsRequest, 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 getUserCoins.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupporters.'); } const queryParameters: any = {}; @@ -1800,72 +2373,81 @@ export class UsersApi extends runtime.BaseAPI { 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}/supporters`.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) => GetSupportersFromJSON(jsonValue)); } /** - * Gets a list of the coins owned by the user and their balances + * Gets the supporters of the given user */ - async getUserCoins(params: GetUserCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCoinsRaw(params, initOverrides); + async getSupporters(params: GetSupportersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupportersRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get the User\'s indexed collectibles data + * Gets the support from the given user to the supported user */ - async getUserCollectiblesRaw(params: GetUserCollectiblesRequest, 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 getUserCollectibles.'); + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSupporting.'); + } + + 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}/collectibles`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + 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) => CollectiblesResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportingFromJSON(jsonValue)); } /** - * Get the User\'s indexed collectibles data + * Gets the support from the given user to the supported user */ - async getUserCollectibles(params: GetUserCollectiblesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCollectiblesRaw(params, initOverrides); + async getSupporting(params: GetSupportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSupportingRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Get user comment history + * Gets the most used track tags by a user. + * Fetch most used tags in a user\'s tracks */ - async getUserCommentsRaw(params: GetUserCommentsRequest, 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 getUserComments.'); + 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; } @@ -1877,7 +2459,748 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/users/{id}/comments`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + path: `/users/{id}/tags`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TagsResponseFromJSON(jsonValue)); + } + + /** + * Gets the most used track tags by a user. + * Fetch most used tags in a user\'s tracks + */ + async getTopTrackTags(params: GetTopTrackTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopTrackTagsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Get the Top Users having at least one track by follower count + */ + 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, @@ -1887,80 +3210,440 @@ export class UsersApi extends runtime.BaseAPI { } /** - * Get user comment history + * 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 getUserComments(params: GetUserCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserCommentsRaw(params, initOverrides); + async getUserEmailKey(params: GetUserEmailKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserEmailKeyRaw(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 favorite 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.'); + 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; + } + + if (params.type !== undefined) { + queryParameters['type'] = params.type; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + + const response = await this.request({ + path: `/users/{id}/library/albums`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CollectionLibraryResponseFromJSON(jsonValue)); + } + + /** + * Gets a user\'s saved/reposted/purchased/all albums + * Fetch a user\'s full library playlists + */ + async getUserLibraryAlbums(params: GetUserLibraryAlbumsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryAlbumsRaw(params, initOverrides); + return await response.value(); + } + + /** + * @hidden + * Gets a user\'s saved/reposted/purchased/all playlists + * Fetch a user\'s full library playlists + */ + async getUserLibraryPlaylistsRaw(params: GetUserLibraryPlaylistsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserLibraryPlaylists.'); + } + + const queryParameters: any = {}; + + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; } - if (params.grantorUserId === null || params.grantorUserId === undefined) { - throw new runtime.RequiredError('grantorUserId','Required parameter params.grantorUserId was null or undefined when calling getUserEmailKey.'); + 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/{receiving_user_id}/emails/{grantor_user_id}/key`.replace(`{${"receiving_user_id"}}`, encodeURIComponent(String(params.receivingUserId))).replace(`{${"grantor_user_id"}}`, encodeURIComponent(String(params.grantorUserId))), + path: `/users/{id}/library/playlists`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => EmailAccessResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => CollectionLibraryResponseFromJSON(jsonValue)); } /** - * Gets the encrypted key for email access between the receiving user and granting user. + * Gets a user\'s saved/reposted/purchased/all playlists + * Fetch a user\'s full library playlists */ - async getUserEmailKey(params: GetUserEmailKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserEmailKeyRaw(params, initOverrides); + async getUserLibraryPlaylists(params: GetUserLibraryPlaylistsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserLibraryPlaylistsRaw(params, initOverrides); return await response.value(); } /** * @hidden - * Gets User IDs from any Ethereum wallet address or Solana account address associated with their Audius account. + * Gets a user\'s saved/reposted/purchased/all tracks + * Fetch a user\'s full library tracks */ - async getUserIDsByAddressesRaw(params: GetUserIDsByAddressesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (params.address === null || params.address === undefined) { - throw new runtime.RequiredError('address','Required parameter params.address was null or undefined when calling getUserIDsByAddresses.'); + async getUserLibraryTracksRaw(params: GetUserLibraryTracksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.id === null || params.id === undefined) { + throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUserLibraryTracks.'); } const queryParameters: any = {}; - if (params.address) { - queryParameters['address'] = params.address; + if (params.offset !== undefined) { + queryParameters['offset'] = params.offset; + } + + if (params.limit !== undefined) { + queryParameters['limit'] = params.limit; + } + + if (params.userId !== undefined) { + queryParameters['user_id'] = params.userId; + } + + if (params.query !== undefined) { + queryParameters['query'] = params.query; + } + + if (params.sortMethod !== undefined) { + queryParameters['sort_method'] = params.sortMethod; + } + + if (params.sortDirection !== undefined) { + queryParameters['sort_direction'] = params.sortDirection; + } + + if (params.type !== undefined) { + queryParameters['type'] = params.type; } const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ - path: `/users/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(); } @@ -2015,7 +3698,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.'); } @@ -2047,13 +3730,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(); } @@ -2299,6 +3982,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 */ @@ -2307,6 +4006,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 */ @@ -2358,6 +4093,123 @@ export const GetTracksByUserGateConditionEnum = { Token: 'token' } as const; export type GetTracksByUserGateConditionEnum = typeof GetTracksByUserGateConditionEnum[keyof typeof GetTracksByUserGateConditionEnum]; +/** + * @export + */ +export const GetTracksByUserHandleSortEnum = { + Date: 'date', + Plays: 'plays' +} as const; +export type GetTracksByUserHandleSortEnum = typeof GetTracksByUserHandleSortEnum[keyof typeof GetTracksByUserHandleSortEnum]; +/** + * @export + */ +export const GetTracksByUserHandleSortMethodEnum = { + 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 GetTracksByUserHandleSortMethodEnum = typeof GetTracksByUserHandleSortMethodEnum[keyof typeof GetTracksByUserHandleSortMethodEnum]; +/** + * @export + */ +export const GetTracksByUserHandleSortDirectionEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type GetTracksByUserHandleSortDirectionEnum = typeof GetTracksByUserHandleSortDirectionEnum[keyof typeof GetTracksByUserHandleSortDirectionEnum]; +/** + * @export + */ +export const GetTracksByUserHandleFilterTracksEnum = { + All: 'all', + Public: 'public' +} as const; +export type GetTracksByUserHandleFilterTracksEnum = typeof GetTracksByUserHandleFilterTracksEnum[keyof typeof GetTracksByUserHandleFilterTracksEnum]; +/** + * @export + */ +export const GetTracksCountByUserFilterTracksEnum = { + All: 'all', + Public: 'public' +} as const; +export type GetTracksCountByUserFilterTracksEnum = typeof GetTracksCountByUserFilterTracksEnum[keyof typeof GetTracksCountByUserFilterTracksEnum]; +/** + * @export + */ +export const GetTracksCountByUserGateConditionEnum = { + Ungated: 'ungated', + UsdcPurchase: 'usdc_purchase', + Follow: 'follow', + Tip: 'tip', + Nft: 'nft', + 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 */ @@ -2366,6 +4218,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 new file mode 100644 index 00000000000..5f47f67fd71 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { + FollowGate, + instanceOfFollowGate, + FollowGateFromJSON, + FollowGateFromJSONTyped, + FollowGateToJSON, +} from './FollowGate'; +import { + NftGate, + instanceOfNftGate, + NftGateFromJSON, + NftGateFromJSONTyped, + NftGateToJSON, +} from './NftGate'; +import { + PurchaseGate, + instanceOfPurchaseGate, + PurchaseGateFromJSON, + PurchaseGateFromJSONTyped, + PurchaseGateToJSON, +} from './PurchaseGate'; +import { + TipGate, + instanceOfTipGate, + TipGateFromJSON, + TipGateFromJSONTyped, + TipGateToJSON, +} from './TipGate'; +import { + TokenGate, + instanceOfTokenGate, + TokenGateFromJSON, + TokenGateFromJSONTyped, + TokenGateToJSON, +} from './TokenGate'; + +/** + * @type AccessGate + * + * @export + */ +export type AccessGate = FollowGate | NftGate | PurchaseGate | TipGate | TokenGate; + +export function AccessGateFromJSON(json: any): AccessGate { + return AccessGateFromJSONTyped(json, false); +} + +export function AccessGateFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessGate { + if ((json === undefined) || (json === null)) { + return json; + } + return { ...FollowGateFromJSONTyped(json, true), ...NftGateFromJSONTyped(json, true), ...PurchaseGateFromJSONTyped(json, true), ...TipGateFromJSONTyped(json, true), ...TokenGateFromJSONTyped(json, true) }; +} + +export function AccessGateToJSON(value?: AccessGate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + + 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); + } + if (instanceOfTokenGate(value)) { + return TokenGateToJSON(value as TokenGate); + } + + return {}; +} + 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/AccountFull.ts b/packages/sdk/src/sdk/api/generated/default/models/AccountFull.ts new file mode 100644 index 00000000000..170af0cbf81 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AccountFull.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { AccountCollection } from './AccountCollection'; +import { + AccountCollectionFromJSON, + AccountCollectionFromJSONTyped, + AccountCollectionToJSON, +} from './AccountCollection'; +import type { PlaylistLibrary } from './PlaylistLibrary'; +import { + PlaylistLibraryFromJSON, + PlaylistLibraryFromJSONTyped, + PlaylistLibraryToJSON, +} from './PlaylistLibrary'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface AccountFull + */ +export interface AccountFull { + /** + * + * @type {User} + * @memberof AccountFull + */ + user: User; + /** + * + * @type {Array} + * @memberof AccountFull + */ + playlists: Array; + /** + * + * @type {PlaylistLibrary} + * @memberof AccountFull + */ + playlistLibrary?: PlaylistLibrary; + /** + * + * @type {number} + * @memberof AccountFull + */ + trackSaveCount: number; +} + +/** + * Check if a given object implements the AccountFull interface. + */ +export function instanceOfAccountFull(value: object): value is AccountFull { + let isInstance = true; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "playlists" in value && value["playlists"] !== undefined; + isInstance = isInstance && "trackSaveCount" in value && value["trackSaveCount"] !== undefined; + + return isInstance; +} + +export function AccountFullFromJSON(json: any): AccountFull { + return AccountFullFromJSONTyped(json, false); +} + +export function AccountFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'user': 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 AccountFullToJSON(value?: AccountFull | 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/Activity.ts b/packages/sdk/src/sdk/api/generated/default/models/Activity.ts index c556b43cba1..13a0f616203 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Activity.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Activity.ts @@ -16,7 +16,10 @@ import { exists, mapValues } from '../runtime'; import { CollectionActivityFromJSONTyped, - TrackActivityFromJSONTyped + CollectionActivityFullWithoutTracksFromJSONTyped, + CollectionActivityWithoutTracksFromJSONTyped, + TrackActivityFromJSONTyped, + TrackActivityFullFromJSONTyped } from './'; /** @@ -87,9 +90,18 @@ export function ActivityFromJSONTyped(json: any, ignoreDiscriminator: boolean): if (json['_class'] === 'collection_activity') { return CollectionActivityFromJSONTyped(json, true); } + if (json['_class'] === 'collection_activity_full_without_tracks') { + return CollectionActivityFullWithoutTracksFromJSONTyped(json, true); + } + if (json['_class'] === 'collection_activity_without_tracks') { + return CollectionActivityWithoutTracksFromJSONTyped(json, true); + } if (json['_class'] === 'track_activity') { return TrackActivityFromJSONTyped(json, true); } + if (json['_class'] === 'track_activity_full') { + return TrackActivityFullFromJSONTyped(json, true); + } } return { diff --git a/packages/sdk/src/sdk/api/generated/default/models/ActivityFull.ts b/packages/sdk/src/sdk/api/generated/default/models/ActivityFull.ts new file mode 100644 index 00000000000..20215eda364 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ActivityFull.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 { +} from './'; + +/** + * + * @export + * @interface ActivityFull + */ +export interface ActivityFull { + /** + * + * @type {string} + * @memberof ActivityFull + */ + timestamp: string; + /** + * + * @type {string} + * @memberof ActivityFull + */ + itemType: ActivityFullItemTypeEnum; + /** + * + * @type {object} + * @memberof ActivityFull + */ + item: object; + /** + * + * @type {string} + * @memberof ActivityFull + */ + _class: string; +} + + +/** + * @export + */ +export const ActivityFullItemTypeEnum = { + Track: 'track', + Playlist: 'playlist' +} as const; +export type ActivityFullItemTypeEnum = typeof ActivityFullItemTypeEnum[keyof typeof ActivityFullItemTypeEnum]; + + +/** + * Check if a given object implements the ActivityFull interface. + */ +export function instanceOfActivityFull(value: object): value is ActivityFull { + let isInstance = true; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + isInstance = isInstance && "_class" in value && value["_class"] !== undefined; + + return isInstance; +} + +export function ActivityFullFromJSON(json: any): ActivityFull { + return ActivityFullFromJSONTyped(json, false); +} + +export function ActivityFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivityFull { + if ((json === undefined) || (json === null)) { + return json; + } + if (!ignoreDiscriminator) { + } + return { + + 'timestamp': json['timestamp'], + 'itemType': json['item_type'], + 'item': json['item'], + '_class': json['class'], + }; +} + +export function ActivityFullToJSON(value?: ActivityFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'timestamp': value.timestamp, + 'item_type': value.itemType, + 'item': value.item, + 'class': value._class, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/AlbumsResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/AlbumsResponseFull.ts new file mode 100644 index 00000000000..fd39796625d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/AlbumsResponseFull.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 { PlaylistWithoutTracks } from './PlaylistWithoutTracks'; +import { + PlaylistWithoutTracksFromJSON, + PlaylistWithoutTracksFromJSONTyped, + PlaylistWithoutTracksToJSON, +} from './PlaylistWithoutTracks'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface AlbumsResponseFull + */ +export interface AlbumsResponseFull { + /** + * + * @type {number} + * @memberof AlbumsResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof AlbumsResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof AlbumsResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof AlbumsResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof AlbumsResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof AlbumsResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof AlbumsResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof AlbumsResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the AlbumsResponseFull interface. + */ +export function instanceOfAlbumsResponseFull(value: object): value is AlbumsResponseFull { + 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 AlbumsResponseFullFromJSON(json: any): AlbumsResponseFull { + return AlbumsResponseFullFromJSONTyped(json, false); +} + +export function AlbumsResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlbumsResponseFull { + 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(PlaylistWithoutTracksFromJSON)), + }; +} + +export function AlbumsResponseFullToJSON(value?: AlbumsResponseFull | 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(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/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..28f57173ad1 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Coin.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Coin.ts @@ -32,12 +32,6 @@ import { CoinDynamicBondingCurveFromJSONTyped, CoinDynamicBondingCurveToJSON, } from './CoinDynamicBondingCurve'; -import type { CoinExtensions } from './CoinExtensions'; -import { - CoinExtensionsFromJSON, - CoinExtensionsFromJSONTyped, - CoinExtensionsToJSON, -} from './CoinExtensions'; import type { CoinRewardPool } from './CoinRewardPool'; import { CoinRewardPoolFromJSON, @@ -46,67 +40,73 @@ import { } from './CoinRewardPool'; /** - * + * 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,325 +140,85 @@ 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; - /** - * Market capitalization in USD - * @type {number} - * @memberof Coin - */ - marketCap: number; - /** - * Fully diluted valuation in USD - * @type {number} - * @memberof Coin - */ - fdv: number; - /** - * - * @type {CoinExtensions} - * @memberof Coin - */ - extensions?: CoinExtensions; + ownerId?: string; /** - * Current liquidity in USD - * @type {number} - * @memberof Coin - */ - liquidity: number; - /** - * Unix timestamp of the last trade - * @type {number} - * @memberof Coin - */ - lastTradeUnixTime: number; - /** - * ISO8601 time of the last trade + * The escrow recipient address for custom-created coins without DBCs * @type {string} * @memberof Coin */ - lastTradeHumanTime: string; - /** - * Current price in USD - * @type {number} - * @memberof Coin - */ - price: number; + escrowRecipient?: string; /** - * Price 24 hours ago in USD + * Current price in USD (from Birdeye or bonding curve) * @type {number} * @memberof Coin */ - history24hPrice: number; + price?: number; /** * 24h price change in percent * @type {number} * @memberof Coin */ - priceChange24hPercent: number; - /** - * Unique wallets traded in last 24h - * @type {number} - * @memberof Coin - */ - uniqueWallet24h: number; + priceChange24hPercent?: number; /** - * Unique wallets traded in previous 24h + * Current liquidity in USD * @type {number} * @memberof Coin */ - uniqueWalletHistory24h: number; + liquidity?: number; /** - * 24h change in unique wallets (percent) + * Market capitalization in USD * @type {number} * @memberof Coin */ - uniqueWallet24hChangePercent: number; + marketCap?: number; /** * Total supply of the token * @type {number} * @memberof Coin */ - totalSupply: number; + totalSupply?: number; /** * Circulating supply of the token * @type {number} * @memberof Coin */ - circulatingSupply: number; + circulatingSupply?: 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; - /** - * 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; + holder?: 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) - * @type {number} - * @memberof Coin - */ - volumeBuyUSD: number; - /** - * Total volume sold (all time) - * @type {number} - * @memberof Coin - */ - volumeSell: number; - /** - * Total volume sold in USD (all time) - * @type {number} - * @memberof Coin - */ - volumeSellUSD: number; - /** - * Total number of trades (all time) - * @type {number} - * @memberof Coin - */ - totalTrade: number; - /** - * Total number of buys (all time) - * @type {number} - * @memberof Coin - */ - buy: number; - /** - * Total number of sells (all time) - * @type {number} - * @memberof Coin - */ - sell: number; + totalVolumeUSD?: number; /** * * @type {CoinDynamicBondingCurve} * @memberof Coin */ - dynamicBondingCurve: CoinDynamicBondingCurve; + dynamicBondingCurve?: CoinDynamicBondingCurve; /** * * @type {CoinArtistFees} @@ -484,48 +244,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,74 +263,35 @@ 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']), + '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'], + 'price': !exists(json, 'price') ? undefined : json['price'], + 'priceChange24hPercent': !exists(json, 'priceChange24hPercent') ? undefined : json['priceChange24hPercent'], + 'liquidity': !exists(json, 'liquidity') ? undefined : json['liquidity'], + 'marketCap': !exists(json, 'marketCap') ? undefined : json['marketCap'], + 'totalSupply': !exists(json, 'totalSupply') ? undefined : json['totalSupply'], + 'circulatingSupply': !exists(json, 'circulatingSupply') ? undefined : json['circulatingSupply'], + 'holder': !exists(json, 'holder') ? undefined : json['holder'], + 'totalVolumeUSD': !exists(json, 'totalVolumeUSD') ? undefined : json['totalVolumeUSD'], + 'dynamicBondingCurve': !exists(json, 'dynamicBondingCurve') ? undefined : 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']), @@ -623,73 +307,34 @@ 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, 'price': value.price, - 'history24hPrice': value.history24hPrice, 'priceChange24hPercent': value.priceChange24hPercent, - 'uniqueWallet24h': value.uniqueWallet24h, - 'uniqueWalletHistory24h': value.uniqueWalletHistory24h, - 'uniqueWallet24hChangePercent': value.uniqueWallet24hChangePercent, + 'liquidity': value.liquidity, + 'marketCap': value.marketCap, 'totalSupply': value.totalSupply, '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), diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoinArtistFees.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinArtistFees.ts index 07f1020dacb..3964f11b6af 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinArtistFees.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinArtistFees.ts @@ -15,19 +15,19 @@ import { exists, mapValues } from '../runtime'; /** - * Information about the fees earned by the artist on the coin's trading. + * Artist fee information * @export * @interface CoinArtistFees */ export interface CoinArtistFees { /** - * Total unclaimed fees from all sources, in $AUDIO. + * * @type {number} * @memberof CoinArtistFees */ unclaimedFees?: number; /** - * Total fees earned from all sources, in $AUDIO. + * * @type {number} * @memberof CoinArtistFees */ diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoinArtistLocker.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinArtistLocker.ts index 661186561c4..97831ea497b 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinArtistLocker.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinArtistLocker.ts @@ -15,31 +15,31 @@ import { exists, mapValues } from '../runtime'; /** - * Information about the artist locker associated with the coin. + * Artist locker vesting information * @export * @interface CoinArtistLocker */ export interface CoinArtistLocker { /** - * The address of the artist locker. + * * @type {string} * @memberof CoinArtistLocker */ address?: string; /** - * The amount currently locked in the artist locker. + * * @type {number} * @memberof CoinArtistLocker */ locked?: number; /** - * The amount currently unlocked in the artist locker. + * * @type {number} * @memberof CoinArtistLocker */ unlocked?: number; /** - * The amount claimable from the artist locker. Eg. the amount unlocked that hasn't already been claimed. + * * @type {number} * @memberof CoinArtistLocker */ diff --git a/packages/sdk/src/sdk/api/generated/default/models/CoinDynamicBondingCurve.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinDynamicBondingCurve.ts index 956499c3aca..1fe0fd69464 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinDynamicBondingCurve.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinDynamicBondingCurve.ts @@ -15,7 +15,7 @@ import { exists, mapValues } from '../runtime'; /** - * Information about the dynamic bonding curve if one exists for the Coin + * Information about the dynamic bonding curve if one exists * @export * @interface CoinDynamicBondingCurve */ @@ -25,25 +25,25 @@ export interface CoinDynamicBondingCurve { * @type {string} * @memberof CoinDynamicBondingCurve */ - address: string; + address?: string; /** - * Current price in the pool's quote token (e.g., AUDIO) + * Current price in the pool's quote token * @type {number} * @memberof CoinDynamicBondingCurve */ - price: number; + price?: number; /** * Current price in USD * @type {number} * @memberof CoinDynamicBondingCurve */ - priceUSD: number; + priceUSD?: number; /** * Progress along the bonding curve (0.0 - 1.0) * @type {number} * @memberof CoinDynamicBondingCurve */ - curveProgress: number; + curveProgress?: number; /** * Whether the bonding curve has been migrated * @type {boolean} @@ -55,19 +55,19 @@ export interface CoinDynamicBondingCurve { * @type {number} * @memberof CoinDynamicBondingCurve */ - creatorQuoteFee: number; + creatorQuoteFee?: number; /** * Total trading quote fee accumulated * @type {number} * @memberof CoinDynamicBondingCurve */ - totalTradingQuoteFee: number; + totalTradingQuoteFee?: number; /** * Address of the pool creator's wallet * @type {string} * @memberof CoinDynamicBondingCurve */ - creatorWalletAddress: string; + creatorWalletAddress?: string; } /** @@ -75,13 +75,6 @@ export interface CoinDynamicBondingCurve { */ export function instanceOfCoinDynamicBondingCurve(value: object): value is CoinDynamicBondingCurve { let isInstance = true; - isInstance = isInstance && "address" in value && value["address"] !== undefined; - isInstance = isInstance && "price" in value && value["price"] !== undefined; - isInstance = isInstance && "priceUSD" in value && value["priceUSD"] !== undefined; - isInstance = isInstance && "curveProgress" in value && value["curveProgress"] !== undefined; - isInstance = isInstance && "creatorQuoteFee" in value && value["creatorQuoteFee"] !== undefined; - isInstance = isInstance && "totalTradingQuoteFee" in value && value["totalTradingQuoteFee"] !== undefined; - isInstance = isInstance && "creatorWalletAddress" in value && value["creatorWalletAddress"] !== undefined; return isInstance; } @@ -96,14 +89,14 @@ export function CoinDynamicBondingCurveFromJSONTyped(json: any, ignoreDiscrimina } return { - 'address': json['address'], - 'price': json['price'], - 'priceUSD': json['priceUSD'], - 'curveProgress': json['curveProgress'], + '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': json['creatorQuoteFee'], - 'totalTradingQuoteFee': json['totalTradingQuoteFee'], - 'creatorWalletAddress': json['creatorWalletAddress'], + 'creatorQuoteFee': !exists(json, 'creatorQuoteFee') ? undefined : json['creatorQuoteFee'], + 'totalTradingQuoteFee': !exists(json, 'totalTradingQuoteFee') ? undefined : json['totalTradingQuoteFee'], + 'creatorWalletAddress': !exists(json, 'creatorWalletAddress') ? undefined : json['creatorWalletAddress'], }; } 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/CoinInsightsDynamicBondingCurve.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinInsightsDynamicBondingCurve.ts new file mode 100644 index 00000000000..cf95e34298d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinInsightsDynamicBondingCurve.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'; +/** + * Information about the dynamic bonding curve if one exists for the Coin + * @export + * @interface CoinInsightsDynamicBondingCurve + */ +export interface CoinInsightsDynamicBondingCurve { + /** + * Address of the bonding curve pool + * @type {string} + * @memberof CoinInsightsDynamicBondingCurve + */ + address: string; + /** + * Current price in the pool's quote token (e.g., AUDIO) + * @type {number} + * @memberof CoinInsightsDynamicBondingCurve + */ + price: number; + /** + * Current price in USD + * @type {number} + * @memberof CoinInsightsDynamicBondingCurve + */ + priceUSD: number; + /** + * Progress along the bonding curve (0.0 - 1.0) + * @type {number} + * @memberof CoinInsightsDynamicBondingCurve + */ + curveProgress: number; + /** + * Whether the bonding curve has been migrated + * @type {boolean} + * @memberof CoinInsightsDynamicBondingCurve + */ + isMigrated?: boolean; + /** + * Creator quote fee for the bonding curve + * @type {number} + * @memberof CoinInsightsDynamicBondingCurve + */ + creatorQuoteFee: number; + /** + * Total trading quote fee accumulated + * @type {number} + * @memberof CoinInsightsDynamicBondingCurve + */ + totalTradingQuoteFee: number; + /** + * Address of the pool creator's wallet + * @type {string} + * @memberof CoinInsightsDynamicBondingCurve + */ + creatorWalletAddress: string; +} + +/** + * Check if a given object implements the CoinInsightsDynamicBondingCurve interface. + */ +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; + isInstance = isInstance && "priceUSD" in value && value["priceUSD"] !== undefined; + isInstance = isInstance && "curveProgress" in value && value["curveProgress"] !== undefined; + isInstance = isInstance && "creatorQuoteFee" in value && value["creatorQuoteFee"] !== undefined; + isInstance = isInstance && "totalTradingQuoteFee" in value && value["totalTradingQuoteFee"] !== undefined; + isInstance = isInstance && "creatorWalletAddress" in value && value["creatorWalletAddress"] !== undefined; + + return isInstance; +} + +export function CoinInsightsDynamicBondingCurveFromJSON(json: any): CoinInsightsDynamicBondingCurve { + return CoinInsightsDynamicBondingCurveFromJSONTyped(json, false); +} + +export function CoinInsightsDynamicBondingCurveFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoinInsightsDynamicBondingCurve { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'address': json['address'], + 'price': json['price'], + 'priceUSD': json['priceUSD'], + 'curveProgress': json['curveProgress'], + 'isMigrated': !exists(json, 'isMigrated') ? undefined : json['isMigrated'], + 'creatorQuoteFee': json['creatorQuoteFee'], + 'totalTradingQuoteFee': json['totalTradingQuoteFee'], + 'creatorWalletAddress': json['creatorWalletAddress'], + }; +} + +export function CoinInsightsDynamicBondingCurveToJSON(value?: CoinInsightsDynamicBondingCurve | 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/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/CoinRewardPool.ts b/packages/sdk/src/sdk/api/generated/default/models/CoinRewardPool.ts index 5ef5d9a159e..39229cbf9cb 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/CoinRewardPool.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/CoinRewardPool.ts @@ -15,19 +15,19 @@ import { exists, mapValues } from '../runtime'; /** - * Information about the reward pool associated with the coin. + * Reward pool information * @export * @interface CoinRewardPool */ export interface CoinRewardPool { /** - * The address of the reward pool. + * * @type {string} * @memberof CoinRewardPool */ address?: string; /** - * The current balance of the reward pool. + * * @type {number} * @memberof CoinRewardPool */ diff --git a/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityFullWithoutTracks.ts b/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityFullWithoutTracks.ts new file mode 100644 index 00000000000..770b7e14500 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CollectionActivityFullWithoutTracks.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Activity } from './Activity'; +import { + ActivityFromJSON, + ActivityFromJSONTyped, + ActivityToJSON, +} from './Activity'; +import type { PlaylistWithoutTracks } from './PlaylistWithoutTracks'; +import { + PlaylistWithoutTracksFromJSON, + PlaylistWithoutTracksFromJSONTyped, + PlaylistWithoutTracksToJSON, +} from './PlaylistWithoutTracks'; + +/** + * + * @export + * @interface CollectionActivityFullWithoutTracks + */ +export interface CollectionActivityFullWithoutTracks extends Activity { + /** + * + * @type {string} + * @memberof CollectionActivityFullWithoutTracks + */ + itemType: CollectionActivityFullWithoutTracksItemTypeEnum; + /** + * + * @type {PlaylistWithoutTracks} + * @memberof CollectionActivityFullWithoutTracks + */ + item: PlaylistWithoutTracks; +} + + +/** + * @export + */ +export const CollectionActivityFullWithoutTracksItemTypeEnum = { + Playlist: 'playlist' +} as const; +export type CollectionActivityFullWithoutTracksItemTypeEnum = typeof CollectionActivityFullWithoutTracksItemTypeEnum[keyof typeof CollectionActivityFullWithoutTracksItemTypeEnum]; + + +/** + * Check if a given object implements the CollectionActivityFullWithoutTracks interface. + */ +export function instanceOfCollectionActivityFullWithoutTracks(value: object): value is CollectionActivityFullWithoutTracks { + let isInstance = true; + isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + + return isInstance; +} + +export function CollectionActivityFullWithoutTracksFromJSON(json: any): CollectionActivityFullWithoutTracks { + return CollectionActivityFullWithoutTracksFromJSONTyped(json, false); +} + +export function CollectionActivityFullWithoutTracksFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionActivityFullWithoutTracks { + if ((json === undefined) || (json === null)) { + return json; + } + return { + ...ActivityFromJSONTyped(json, ignoreDiscriminator), + 'itemType': json['item_type'], + 'item': PlaylistWithoutTracksFromJSON(json['item']), + }; +} + +export function CollectionActivityFullWithoutTracksToJSON(value?: CollectionActivityFullWithoutTracks | 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/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/CollectionLibraryResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponseFull.ts new file mode 100644 index 00000000000..28d4c32fc14 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CollectionLibraryResponseFull.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CollectionActivityWithoutTracks } from './CollectionActivityWithoutTracks'; +import { + CollectionActivityWithoutTracksFromJSON, + CollectionActivityWithoutTracksFromJSONTyped, + CollectionActivityWithoutTracksToJSON, +} from './CollectionActivityWithoutTracks'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface CollectionLibraryResponseFull + */ +export interface CollectionLibraryResponseFull { + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof CollectionLibraryResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof CollectionLibraryResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof CollectionLibraryResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof CollectionLibraryResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof CollectionLibraryResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the CollectionLibraryResponseFull interface. + */ +export function instanceOfCollectionLibraryResponseFull(value: object): value is CollectionLibraryResponseFull { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function CollectionLibraryResponseFullFromJSON(json: any): CollectionLibraryResponseFull { + return CollectionLibraryResponseFullFromJSONTyped(json, false); +} + +export function CollectionLibraryResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionLibraryResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(CollectionActivityWithoutTracksFromJSON)), + }; +} + +export function CollectionLibraryResponseFullToJSON(value?: CollectionLibraryResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(CollectionActivityWithoutTracksToJSON)), + }; +} + 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/CoverPhotoFull.ts b/packages/sdk/src/sdk/api/generated/default/models/CoverPhotoFull.ts new file mode 100644 index 00000000000..4726210b5b8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/CoverPhotoFull.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CoverPhotoFull + */ +export interface CoverPhotoFull { + /** + * + * @type {string} + * @memberof CoverPhotoFull + */ + _640x?: string; + /** + * + * @type {string} + * @memberof CoverPhotoFull + */ + _2000x?: string; + /** + * + * @type {Array} + * @memberof CoverPhotoFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the CoverPhotoFull interface. + */ +export function instanceOfCoverPhotoFull(value: object): value is CoverPhotoFull { + let isInstance = true; + + return isInstance; +} + +export function CoverPhotoFullFromJSON(json: any): CoverPhotoFull { + return CoverPhotoFullFromJSONTyped(json, false); +} + +export function CoverPhotoFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoverPhotoFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_640x': !exists(json, '640x') ? undefined : json['640x'], + '_2000x': !exists(json, '2000x') ? undefined : json['2000x'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function CoverPhotoFullToJSON(value?: CoverPhotoFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '640x': value._640x, + '2000x': value._2000x, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/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/DataAndType.ts b/packages/sdk/src/sdk/api/generated/default/models/DataAndType.ts new file mode 100644 index 00000000000..d6622754bfb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/DataAndType.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CidData } from './CidData'; +import { + CidDataFromJSON, + CidDataFromJSONTyped, + CidDataToJSON, +} from './CidData'; + +/** + * + * @export + * @interface DataAndType + */ +export interface DataAndType { + /** + * + * @type {string} + * @memberof DataAndType + */ + type?: string; + /** + * + * @type {CidData} + * @memberof DataAndType + */ + data?: CidData; +} + +/** + * Check if a given object implements the DataAndType interface. + */ +export function instanceOfDataAndType(value: object): value is DataAndType { + let isInstance = true; + + return isInstance; +} + +export function DataAndTypeFromJSON(json: any): DataAndType { + return DataAndTypeFromJSONTyped(json, false); +} + +export function DataAndTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataAndType { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': !exists(json, 'type') ? undefined : json['type'], + 'data': !exists(json, 'data') ? undefined : CidDataFromJSON(json['data']), + }; +} + +export function DataAndTypeToJSON(value?: DataAndType | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'data': CidDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotification.ts new file mode 100644 index 00000000000..079bc8d5517 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndedNotificationAction } from './FanRemixContestEndedNotificationAction'; +import { + FanRemixContestEndedNotificationActionFromJSON, + FanRemixContestEndedNotificationActionFromJSONTyped, + FanRemixContestEndedNotificationActionToJSON, +} from './FanRemixContestEndedNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestEndedNotification + */ +export interface FanRemixContestEndedNotification { + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestEndedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestEndedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestEndedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestEndedNotification interface. + */ +export function instanceOfFanRemixContestEndedNotification(value: object): value is FanRemixContestEndedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndedNotificationFromJSON(json: any): FanRemixContestEndedNotification { + return FanRemixContestEndedNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestEndedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestEndedNotificationActionFromJSON)), + }; +} + +export function FanRemixContestEndedNotificationToJSON(value?: FanRemixContestEndedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestEndedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationAction.ts new file mode 100644 index 00000000000..0f2d56cecf2 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndedNotificationActionData } from './FanRemixContestEndedNotificationActionData'; +import { + FanRemixContestEndedNotificationActionDataFromJSON, + FanRemixContestEndedNotificationActionDataFromJSONTyped, + FanRemixContestEndedNotificationActionDataToJSON, +} from './FanRemixContestEndedNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestEndedNotificationAction + */ +export interface FanRemixContestEndedNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestEndedNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestEndedNotificationActionData} + * @memberof FanRemixContestEndedNotificationAction + */ + data: FanRemixContestEndedNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestEndedNotificationAction interface. + */ +export function instanceOfFanRemixContestEndedNotificationAction(value: object): value is FanRemixContestEndedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndedNotificationActionFromJSON(json: any): FanRemixContestEndedNotificationAction { + return FanRemixContestEndedNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestEndedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestEndedNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestEndedNotificationActionToJSON(value?: FanRemixContestEndedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestEndedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationActionData.ts new file mode 100644 index 00000000000..efa269f9166 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndedNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestEndedNotificationActionData + */ +export interface FanRemixContestEndedNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndedNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestEndedNotificationActionData interface. + */ +export function instanceOfFanRemixContestEndedNotificationActionData(value: object): value is FanRemixContestEndedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndedNotificationActionDataFromJSON(json: any): FanRemixContestEndedNotificationActionData { + return FanRemixContestEndedNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestEndedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestEndedNotificationActionDataToJSON(value?: FanRemixContestEndedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotification.ts new file mode 100644 index 00000000000..476bd4b6eb2 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndingSoonNotificationAction } from './FanRemixContestEndingSoonNotificationAction'; +import { + FanRemixContestEndingSoonNotificationActionFromJSON, + FanRemixContestEndingSoonNotificationActionFromJSONTyped, + FanRemixContestEndingSoonNotificationActionToJSON, +} from './FanRemixContestEndingSoonNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestEndingSoonNotification + */ +export interface FanRemixContestEndingSoonNotification { + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestEndingSoonNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestEndingSoonNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestEndingSoonNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestEndingSoonNotification interface. + */ +export function instanceOfFanRemixContestEndingSoonNotification(value: object): value is FanRemixContestEndingSoonNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndingSoonNotificationFromJSON(json: any): FanRemixContestEndingSoonNotification { + return FanRemixContestEndingSoonNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestEndingSoonNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndingSoonNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestEndingSoonNotificationActionFromJSON)), + }; +} + +export function FanRemixContestEndingSoonNotificationToJSON(value?: FanRemixContestEndingSoonNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestEndingSoonNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationAction.ts new file mode 100644 index 00000000000..3beb168abce --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestEndingSoonNotificationActionData } from './FanRemixContestEndingSoonNotificationActionData'; +import { + FanRemixContestEndingSoonNotificationActionDataFromJSON, + FanRemixContestEndingSoonNotificationActionDataFromJSONTyped, + FanRemixContestEndingSoonNotificationActionDataToJSON, +} from './FanRemixContestEndingSoonNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestEndingSoonNotificationAction + */ +export interface FanRemixContestEndingSoonNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestEndingSoonNotificationActionData} + * @memberof FanRemixContestEndingSoonNotificationAction + */ + data: FanRemixContestEndingSoonNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestEndingSoonNotificationAction interface. + */ +export function instanceOfFanRemixContestEndingSoonNotificationAction(value: object): value is FanRemixContestEndingSoonNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndingSoonNotificationActionFromJSON(json: any): FanRemixContestEndingSoonNotificationAction { + return FanRemixContestEndingSoonNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestEndingSoonNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndingSoonNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestEndingSoonNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestEndingSoonNotificationActionToJSON(value?: FanRemixContestEndingSoonNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestEndingSoonNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationActionData.ts new file mode 100644 index 00000000000..a66e046cfcd --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestEndingSoonNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestEndingSoonNotificationActionData + */ +export interface FanRemixContestEndingSoonNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestEndingSoonNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestEndingSoonNotificationActionData interface. + */ +export function instanceOfFanRemixContestEndingSoonNotificationActionData(value: object): value is FanRemixContestEndingSoonNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestEndingSoonNotificationActionDataFromJSON(json: any): FanRemixContestEndingSoonNotificationActionData { + return FanRemixContestEndingSoonNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestEndingSoonNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestEndingSoonNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestEndingSoonNotificationActionDataToJSON(value?: FanRemixContestEndingSoonNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotification.ts new file mode 100644 index 00000000000..053bfb735e5 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestStartedNotificationAction } from './FanRemixContestStartedNotificationAction'; +import { + FanRemixContestStartedNotificationActionFromJSON, + FanRemixContestStartedNotificationActionFromJSONTyped, + FanRemixContestStartedNotificationActionToJSON, +} from './FanRemixContestStartedNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestStartedNotification + */ +export interface FanRemixContestStartedNotification { + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestStartedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestStartedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestStartedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestStartedNotification interface. + */ +export function instanceOfFanRemixContestStartedNotification(value: object): value is FanRemixContestStartedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestStartedNotificationFromJSON(json: any): FanRemixContestStartedNotification { + return FanRemixContestStartedNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestStartedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestStartedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestStartedNotificationActionFromJSON)), + }; +} + +export function FanRemixContestStartedNotificationToJSON(value?: FanRemixContestStartedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestStartedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationAction.ts new file mode 100644 index 00000000000..0ffc61808ba --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestStartedNotificationActionData } from './FanRemixContestStartedNotificationActionData'; +import { + FanRemixContestStartedNotificationActionDataFromJSON, + FanRemixContestStartedNotificationActionDataFromJSONTyped, + FanRemixContestStartedNotificationActionDataToJSON, +} from './FanRemixContestStartedNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestStartedNotificationAction + */ +export interface FanRemixContestStartedNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestStartedNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestStartedNotificationActionData} + * @memberof FanRemixContestStartedNotificationAction + */ + data: FanRemixContestStartedNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestStartedNotificationAction interface. + */ +export function instanceOfFanRemixContestStartedNotificationAction(value: object): value is FanRemixContestStartedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestStartedNotificationActionFromJSON(json: any): FanRemixContestStartedNotificationAction { + return FanRemixContestStartedNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestStartedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestStartedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestStartedNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestStartedNotificationActionToJSON(value?: FanRemixContestStartedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestStartedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationActionData.ts new file mode 100644 index 00000000000..dee62c2e8fd --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestStartedNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestStartedNotificationActionData + */ +export interface FanRemixContestStartedNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestStartedNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestStartedNotificationActionData interface. + */ +export function instanceOfFanRemixContestStartedNotificationActionData(value: object): value is FanRemixContestStartedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestStartedNotificationActionDataFromJSON(json: any): FanRemixContestStartedNotificationActionData { + return FanRemixContestStartedNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestStartedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestStartedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestStartedNotificationActionDataToJSON(value?: FanRemixContestStartedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotification.ts new file mode 100644 index 00000000000..fcd3c3b9925 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestWinnersSelectedNotificationAction } from './FanRemixContestWinnersSelectedNotificationAction'; +import { + FanRemixContestWinnersSelectedNotificationActionFromJSON, + FanRemixContestWinnersSelectedNotificationActionFromJSONTyped, + FanRemixContestWinnersSelectedNotificationActionToJSON, +} from './FanRemixContestWinnersSelectedNotificationAction'; + +/** + * + * @export + * @interface FanRemixContestWinnersSelectedNotification + */ +export interface FanRemixContestWinnersSelectedNotification { + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FanRemixContestWinnersSelectedNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FanRemixContestWinnersSelectedNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FanRemixContestWinnersSelectedNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FanRemixContestWinnersSelectedNotification interface. + */ +export function instanceOfFanRemixContestWinnersSelectedNotification(value: object): value is FanRemixContestWinnersSelectedNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FanRemixContestWinnersSelectedNotificationFromJSON(json: any): FanRemixContestWinnersSelectedNotification { + return FanRemixContestWinnersSelectedNotificationFromJSONTyped(json, false); +} + +export function FanRemixContestWinnersSelectedNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestWinnersSelectedNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FanRemixContestWinnersSelectedNotificationActionFromJSON)), + }; +} + +export function FanRemixContestWinnersSelectedNotificationToJSON(value?: FanRemixContestWinnersSelectedNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FanRemixContestWinnersSelectedNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationAction.ts new file mode 100644 index 00000000000..6167520d26d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FanRemixContestWinnersSelectedNotificationActionData } from './FanRemixContestWinnersSelectedNotificationActionData'; +import { + FanRemixContestWinnersSelectedNotificationActionDataFromJSON, + FanRemixContestWinnersSelectedNotificationActionDataFromJSONTyped, + FanRemixContestWinnersSelectedNotificationActionDataToJSON, +} from './FanRemixContestWinnersSelectedNotificationActionData'; + +/** + * + * @export + * @interface FanRemixContestWinnersSelectedNotificationAction + */ +export interface FanRemixContestWinnersSelectedNotificationAction { + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + timestamp: number; + /** + * + * @type {FanRemixContestWinnersSelectedNotificationActionData} + * @memberof FanRemixContestWinnersSelectedNotificationAction + */ + data: FanRemixContestWinnersSelectedNotificationActionData; +} + +/** + * Check if a given object implements the FanRemixContestWinnersSelectedNotificationAction interface. + */ +export function instanceOfFanRemixContestWinnersSelectedNotificationAction(value: object): value is FanRemixContestWinnersSelectedNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FanRemixContestWinnersSelectedNotificationActionFromJSON(json: any): FanRemixContestWinnersSelectedNotificationAction { + return FanRemixContestWinnersSelectedNotificationActionFromJSONTyped(json, false); +} + +export function FanRemixContestWinnersSelectedNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestWinnersSelectedNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FanRemixContestWinnersSelectedNotificationActionDataFromJSON(json['data']), + }; +} + +export function FanRemixContestWinnersSelectedNotificationActionToJSON(value?: FanRemixContestWinnersSelectedNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FanRemixContestWinnersSelectedNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationActionData.ts new file mode 100644 index 00000000000..59482d18415 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FanRemixContestWinnersSelectedNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FanRemixContestWinnersSelectedNotificationActionData + */ +export interface FanRemixContestWinnersSelectedNotificationActionData { + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationActionData + */ + entityUserId: string; + /** + * + * @type {string} + * @memberof FanRemixContestWinnersSelectedNotificationActionData + */ + entityId: string; +} + +/** + * Check if a given object implements the FanRemixContestWinnersSelectedNotificationActionData interface. + */ +export function instanceOfFanRemixContestWinnersSelectedNotificationActionData(value: object): value is FanRemixContestWinnersSelectedNotificationActionData { + let isInstance = true; + isInstance = isInstance && "entityUserId" in value && value["entityUserId"] !== undefined; + isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; + + return isInstance; +} + +export function FanRemixContestWinnersSelectedNotificationActionDataFromJSON(json: any): FanRemixContestWinnersSelectedNotificationActionData { + return FanRemixContestWinnersSelectedNotificationActionDataFromJSONTyped(json, false); +} + +export function FanRemixContestWinnersSelectedNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FanRemixContestWinnersSelectedNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'entityUserId': json['entity_user_id'], + 'entityId': json['entity_id'], + }; +} + +export function FanRemixContestWinnersSelectedNotificationActionDataToJSON(value?: FanRemixContestWinnersSelectedNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'entity_user_id': value.entityUserId, + 'entity_id': value.entityId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts b/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts new file mode 100644 index 00000000000..52cab2f27d0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FieldVisibility.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FieldVisibility + */ +export interface FieldVisibility { + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + mood: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + tags: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + genre: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + share: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + playCount: boolean; + /** + * + * @type {boolean} + * @memberof FieldVisibility + */ + remixes: boolean; +} + +/** + * Check if a given object implements the FieldVisibility interface. + */ +export function instanceOfFieldVisibility(value: object): value is FieldVisibility { + let isInstance = true; + isInstance = isInstance && "mood" in value && value["mood"] !== undefined; + isInstance = isInstance && "tags" in value && value["tags"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "share" in value && value["share"] !== undefined; + isInstance = isInstance && "playCount" in value && value["playCount"] !== undefined; + isInstance = isInstance && "remixes" in value && value["remixes"] !== undefined; + + return isInstance; +} + +export function FieldVisibilityFromJSON(json: any): FieldVisibility { + return FieldVisibilityFromJSONTyped(json, false); +} + +export function FieldVisibilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): FieldVisibility { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'mood': json['mood'], + 'tags': json['tags'], + 'genre': json['genre'], + 'share': json['share'], + 'playCount': json['play_count'], + 'remixes': json['remixes'], + }; +} + +export function FieldVisibilityToJSON(value?: FieldVisibility | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'mood': value.mood, + 'tags': value.tags, + 'genre': value.genre, + 'share': value.share, + 'play_count': value.playCount, + 'remixes': value.remixes, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FollowNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowNotification.ts new file mode 100644 index 00000000000..4537dba204b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FollowNotificationAction } from './FollowNotificationAction'; +import { + FollowNotificationActionFromJSON, + FollowNotificationActionFromJSONTyped, + FollowNotificationActionToJSON, +} from './FollowNotificationAction'; + +/** + * + * @export + * @interface FollowNotification + */ +export interface FollowNotification { + /** + * + * @type {string} + * @memberof FollowNotification + */ + type: string; + /** + * + * @type {string} + * @memberof FollowNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof FollowNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof FollowNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof FollowNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the FollowNotification interface. + */ +export function instanceOfFollowNotification(value: object): value is FollowNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function FollowNotificationFromJSON(json: any): FollowNotification { + return FollowNotificationFromJSONTyped(json, false); +} + +export function FollowNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FollowNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(FollowNotificationActionFromJSON)), + }; +} + +export function FollowNotificationToJSON(value?: FollowNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(FollowNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationAction.ts new file mode 100644 index 00000000000..df313257d12 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { FollowNotificationActionData } from './FollowNotificationActionData'; +import { + FollowNotificationActionDataFromJSON, + FollowNotificationActionDataFromJSONTyped, + FollowNotificationActionDataToJSON, +} from './FollowNotificationActionData'; + +/** + * + * @export + * @interface FollowNotificationAction + */ +export interface FollowNotificationAction { + /** + * + * @type {string} + * @memberof FollowNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof FollowNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof FollowNotificationAction + */ + timestamp: number; + /** + * + * @type {FollowNotificationActionData} + * @memberof FollowNotificationAction + */ + data: FollowNotificationActionData; +} + +/** + * Check if a given object implements the FollowNotificationAction interface. + */ +export function instanceOfFollowNotificationAction(value: object): value is FollowNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function FollowNotificationActionFromJSON(json: any): FollowNotificationAction { + return FollowNotificationActionFromJSONTyped(json, false); +} + +export function FollowNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FollowNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': FollowNotificationActionDataFromJSON(json['data']), + }; +} + +export function FollowNotificationActionToJSON(value?: FollowNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': FollowNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationActionData.ts new file mode 100644 index 00000000000..7a64349144c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowNotificationActionData.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface FollowNotificationActionData + */ +export interface FollowNotificationActionData { + /** + * + * @type {string} + * @memberof FollowNotificationActionData + */ + followerUserId: string; + /** + * + * @type {string} + * @memberof FollowNotificationActionData + */ + followeeUserId: string; +} + +/** + * Check if a given object implements the FollowNotificationActionData interface. + */ +export function instanceOfFollowNotificationActionData(value: object): value is FollowNotificationActionData { + let isInstance = true; + isInstance = isInstance && "followerUserId" in value && value["followerUserId"] !== undefined; + isInstance = isInstance && "followeeUserId" in value && value["followeeUserId"] !== undefined; + + return isInstance; +} + +export function FollowNotificationActionDataFromJSON(json: any): FollowNotificationActionData { + return FollowNotificationActionDataFromJSONTyped(json, false); +} + +export function FollowNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FollowNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'followerUserId': json['follower_user_id'], + 'followeeUserId': json['followee_user_id'], + }; +} + +export function FollowNotificationActionDataToJSON(value?: FollowNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'follower_user_id': value.followerUserId, + 'followee_user_id': value.followeeUserId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/FollowingResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/FollowingResponseFull.ts new file mode 100644 index 00000000000..38f9f7ebbf9 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FollowingResponseFull.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 FollowingResponseFull + */ +export interface FollowingResponseFull { + /** + * + * @type {number} + * @memberof FollowingResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FollowingResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FollowingResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FollowingResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FollowingResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof FollowingResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FollowingResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FollowingResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the FollowingResponseFull interface. + */ +export function instanceOfFollowingResponseFull(value: object): value is FollowingResponseFull { + 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 FollowingResponseFullFromJSON(json: any): FollowingResponseFull { + return FollowingResponseFullFromJSONTyped(json, false); +} + +export function FollowingResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): FollowingResponseFull { + 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 FollowingResponseFullToJSON(value?: FollowingResponseFull | 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/FullFollowersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullFollowersResponse.ts new file mode 100644 index 00000000000..6919138531c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullFollowersResponse.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 FullFollowersResponse + */ +export interface FullFollowersResponse { + /** + * + * @type {number} + * @memberof FullFollowersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullFollowersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullFollowersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullFollowersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullFollowersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullFollowersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullFollowersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullFollowersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullFollowersResponse interface. + */ +export function instanceOfFullFollowersResponse(value: object): value is FullFollowersResponse { + 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 FullFollowersResponseFromJSON(json: any): FullFollowersResponse { + return FullFollowersResponseFromJSONTyped(json, false); +} + +export function FullFollowersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullFollowersResponse { + 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 FullFollowersResponseToJSON(value?: FullFollowersResponse | 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/FullGetSupportedUsers.ts b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupportedUsers.ts new file mode 100644 index 00000000000..19a93fb648c --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupportedUsers.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 FullGetSupportedUsers + */ +export interface FullGetSupportedUsers { + /** + * + * @type {number} + * @memberof FullGetSupportedUsers + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupportedUsers + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupportedUsers + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullGetSupportedUsers + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullGetSupportedUsers + */ + signature: string; + /** + * + * @type {string} + * @memberof FullGetSupportedUsers + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullGetSupportedUsers + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullGetSupportedUsers + */ + data?: Array; +} + +/** + * Check if a given object implements the FullGetSupportedUsers interface. + */ +export function instanceOfFullGetSupportedUsers(value: object): value is FullGetSupportedUsers { + 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 FullGetSupportedUsersFromJSON(json: any): FullGetSupportedUsers { + return FullGetSupportedUsersFromJSONTyped(json, false); +} + +export function FullGetSupportedUsersFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullGetSupportedUsers { + 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(SupportingFromJSON)), + }; +} + +export function FullGetSupportedUsersToJSON(value?: FullGetSupportedUsers | 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(SupportingToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporter.ts b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporter.ts new file mode 100644 index 00000000000..5b410414002 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporter.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Supporter } from './Supporter'; +import { + SupporterFromJSON, + SupporterFromJSONTyped, + SupporterToJSON, +} from './Supporter'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullGetSupporter + */ +export interface FullGetSupporter { + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullGetSupporter + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullGetSupporter + */ + signature: string; + /** + * + * @type {string} + * @memberof FullGetSupporter + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullGetSupporter + */ + version: VersionMetadata; + /** + * + * @type {Supporter} + * @memberof FullGetSupporter + */ + data?: Supporter; +} + +/** + * Check if a given object implements the FullGetSupporter interface. + */ +export function instanceOfFullGetSupporter(value: object): value is FullGetSupporter { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullGetSupporterFromJSON(json: any): FullGetSupporter { + return FullGetSupporterFromJSONTyped(json, false); +} + +export function FullGetSupporterFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullGetSupporter { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : SupporterFromJSON(json['data']), + }; +} + +export function FullGetSupporterToJSON(value?: FullGetSupporter | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': SupporterToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporters.ts b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporters.ts new file mode 100644 index 00000000000..1e311908047 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporters.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 FullGetSupporters + */ +export interface FullGetSupporters { + /** + * + * @type {number} + * @memberof FullGetSupporters + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporters + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporters + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullGetSupporters + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullGetSupporters + */ + signature: string; + /** + * + * @type {string} + * @memberof FullGetSupporters + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullGetSupporters + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullGetSupporters + */ + data?: Array; +} + +/** + * Check if a given object implements the FullGetSupporters interface. + */ +export function instanceOfFullGetSupporters(value: object): value is FullGetSupporters { + 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 FullGetSupportersFromJSON(json: any): FullGetSupporters { + return FullGetSupportersFromJSONTyped(json, false); +} + +export function FullGetSupportersFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullGetSupporters { + 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(SupporterFromJSON)), + }; +} + +export function FullGetSupportersToJSON(value?: FullGetSupporters | 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(SupporterToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporting.ts b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporting.ts new file mode 100644 index 00000000000..2fe878173bc --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullGetSupporting.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Supporting } from './Supporting'; +import { + SupportingFromJSON, + SupportingFromJSONTyped, + SupportingToJSON, +} from './Supporting'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface FullGetSupporting + */ +export interface FullGetSupporting { + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullGetSupporting + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullGetSupporting + */ + signature: string; + /** + * + * @type {string} + * @memberof FullGetSupporting + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullGetSupporting + */ + version: VersionMetadata; + /** + * + * @type {Supporting} + * @memberof FullGetSupporting + */ + data?: Supporting; +} + +/** + * Check if a given object implements the FullGetSupporting interface. + */ +export function instanceOfFullGetSupporting(value: object): value is FullGetSupporting { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function FullGetSupportingFromJSON(json: any): FullGetSupporting { + return FullGetSupportingFromJSONTyped(json, false); +} + +export function FullGetSupportingFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullGetSupporting { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : SupportingFromJSON(json['data']), + }; +} + +export function FullGetSupportingToJSON(value?: FullGetSupporting | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': SupportingToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullMutualFollowersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullMutualFollowersResponse.ts new file mode 100644 index 00000000000..fc3ff123d46 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullMutualFollowersResponse.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 FullMutualFollowersResponse + */ +export interface FullMutualFollowersResponse { + /** + * + * @type {number} + * @memberof FullMutualFollowersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullMutualFollowersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullMutualFollowersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullMutualFollowersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullMutualFollowersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullMutualFollowersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullMutualFollowersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullMutualFollowersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullMutualFollowersResponse interface. + */ +export function instanceOfFullMutualFollowersResponse(value: object): value is FullMutualFollowersResponse { + 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 FullMutualFollowersResponseFromJSON(json: any): FullMutualFollowersResponse { + return FullMutualFollowersResponseFromJSONTyped(json, false); +} + +export function FullMutualFollowersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullMutualFollowersResponse { + 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 FullMutualFollowersResponseToJSON(value?: FullMutualFollowersResponse | 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/FullPurchasersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullPurchasersResponse.ts new file mode 100644 index 00000000000..d6e9c2f3553 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullPurchasersResponse.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 FullPurchasersResponse + */ +export interface FullPurchasersResponse { + /** + * + * @type {number} + * @memberof FullPurchasersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullPurchasersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullPurchasersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullPurchasersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullPurchasersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullPurchasersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullPurchasersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullPurchasersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullPurchasersResponse interface. + */ +export function instanceOfFullPurchasersResponse(value: object): value is FullPurchasersResponse { + 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 FullPurchasersResponseFromJSON(json: any): FullPurchasersResponse { + return FullPurchasersResponseFromJSONTyped(json, false); +} + +export function FullPurchasersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullPurchasersResponse { + 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 FullPurchasersResponseToJSON(value?: FullPurchasersResponse | 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/FullRemix.ts b/packages/sdk/src/sdk/api/generated/default/models/FullRemix.ts new file mode 100644 index 00000000000..e2e334b0516 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullRemix.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface FullRemix + */ +export interface FullRemix { + /** + * + * @type {string} + * @memberof FullRemix + */ + parentTrackId: string; + /** + * + * @type {User} + * @memberof FullRemix + */ + user: User; + /** + * + * @type {boolean} + * @memberof FullRemix + */ + hasRemixAuthorReposted: boolean; + /** + * + * @type {boolean} + * @memberof FullRemix + */ + hasRemixAuthorSaved: boolean; +} + +/** + * Check if a given object implements the FullRemix interface. + */ +export function instanceOfFullRemix(value: object): value is FullRemix { + let isInstance = true; + isInstance = isInstance && "parentTrackId" in value && value["parentTrackId"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "hasRemixAuthorReposted" in value && value["hasRemixAuthorReposted"] !== undefined; + isInstance = isInstance && "hasRemixAuthorSaved" in value && value["hasRemixAuthorSaved"] !== undefined; + + return isInstance; +} + +export function FullRemixFromJSON(json: any): FullRemix { + return FullRemixFromJSONTyped(json, false); +} + +export function FullRemixFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullRemix { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'parentTrackId': json['parent_track_id'], + 'user': UserFromJSON(json['user']), + 'hasRemixAuthorReposted': json['has_remix_author_reposted'], + 'hasRemixAuthorSaved': json['has_remix_author_saved'], + }; +} + +export function FullRemixToJSON(value?: FullRemix | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'parent_track_id': value.parentTrackId, + 'user': 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/FullRemixParent.ts b/packages/sdk/src/sdk/api/generated/default/models/FullRemixParent.ts new file mode 100644 index 00000000000..79f5317964d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullRemixParent.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Remix } from './Remix'; +import { + RemixFromJSON, + RemixFromJSONTyped, + RemixToJSON, +} from './Remix'; + +/** + * + * @export + * @interface FullRemixParent + */ +export interface FullRemixParent { + /** + * + * @type {Array} + * @memberof FullRemixParent + */ + tracks?: Array; +} + +/** + * Check if a given object implements the FullRemixParent interface. + */ +export function instanceOfFullRemixParent(value: object): value is FullRemixParent { + let isInstance = true; + + return isInstance; +} + +export function FullRemixParentFromJSON(json: any): FullRemixParent { + return FullRemixParentFromJSONTyped(json, false); +} + +export function FullRemixParentFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullRemixParent { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(RemixFromJSON)), + }; +} + +export function FullRemixParentToJSON(value?: FullRemixParent | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(RemixToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullRemixersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullRemixersResponse.ts new file mode 100644 index 00000000000..87ae8f48464 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullRemixersResponse.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 FullRemixersResponse + */ +export interface FullRemixersResponse { + /** + * + * @type {number} + * @memberof FullRemixersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullRemixersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullRemixersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullRemixersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullRemixersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullRemixersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullRemixersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullRemixersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullRemixersResponse interface. + */ +export function instanceOfFullRemixersResponse(value: object): value is FullRemixersResponse { + 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 FullRemixersResponseFromJSON(json: any): FullRemixersResponse { + return FullRemixersResponseFromJSONTyped(json, false); +} + +export function FullRemixersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullRemixersResponse { + 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 FullRemixersResponseToJSON(value?: FullRemixersResponse | 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/FullSubscribersResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/FullSubscribersResponse.ts new file mode 100644 index 00000000000..07d55145081 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullSubscribersResponse.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 FullSubscribersResponse + */ +export interface FullSubscribersResponse { + /** + * + * @type {number} + * @memberof FullSubscribersResponse + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof FullSubscribersResponse + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof FullSubscribersResponse + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof FullSubscribersResponse + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof FullSubscribersResponse + */ + signature: string; + /** + * + * @type {string} + * @memberof FullSubscribersResponse + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof FullSubscribersResponse + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof FullSubscribersResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the FullSubscribersResponse interface. + */ +export function instanceOfFullSubscribersResponse(value: object): value is FullSubscribersResponse { + 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 FullSubscribersResponseFromJSON(json: any): FullSubscribersResponse { + return FullSubscribersResponseFromJSONTyped(json, false); +} + +export function FullSubscribersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullSubscribersResponse { + 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 FullSubscribersResponseToJSON(value?: FullSubscribersResponse | 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/FullSupporter.ts b/packages/sdk/src/sdk/api/generated/default/models/FullSupporter.ts new file mode 100644 index 00000000000..8c6b052efcb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullSupporter.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface FullSupporter + */ +export interface FullSupporter { + /** + * + * @type {number} + * @memberof FullSupporter + */ + rank: number; + /** + * + * @type {string} + * @memberof FullSupporter + */ + amount: string; + /** + * + * @type {User} + * @memberof FullSupporter + */ + sender: User; +} + +/** + * Check if a given object implements the FullSupporter interface. + */ +export function instanceOfFullSupporter(value: object): value is FullSupporter { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "sender" in value && value["sender"] !== undefined; + + return isInstance; +} + +export function FullSupporterFromJSON(json: any): FullSupporter { + return FullSupporterFromJSONTyped(json, false); +} + +export function FullSupporterFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullSupporter { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'amount': json['amount'], + 'sender': UserFromJSON(json['sender']), + }; +} + +export function FullSupporterToJSON(value?: FullSupporter | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'amount': value.amount, + 'sender': UserToJSON(value.sender), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullSupporting.ts b/packages/sdk/src/sdk/api/generated/default/models/FullSupporting.ts new file mode 100644 index 00000000000..fc4216bb8de --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullSupporting.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface FullSupporting + */ +export interface FullSupporting { + /** + * + * @type {number} + * @memberof FullSupporting + */ + rank: number; + /** + * + * @type {string} + * @memberof FullSupporting + */ + amount: string; + /** + * + * @type {User} + * @memberof FullSupporting + */ + receiver: User; +} + +/** + * Check if a given object implements the FullSupporting interface. + */ +export function instanceOfFullSupporting(value: object): value is FullSupporting { + let isInstance = true; + isInstance = isInstance && "rank" in value && value["rank"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "receiver" in value && value["receiver"] !== undefined; + + return isInstance; +} + +export function FullSupportingFromJSON(json: any): FullSupporting { + return FullSupportingFromJSONTyped(json, false); +} + +export function FullSupportingFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullSupporting { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rank': json['rank'], + 'amount': json['amount'], + 'receiver': UserFromJSON(json['receiver']), + }; +} + +export function FullSupportingToJSON(value?: FullSupporting | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rank': value.rank, + 'amount': value.amount, + 'receiver': UserToJSON(value.receiver), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/FullTip.ts b/packages/sdk/src/sdk/api/generated/default/models/FullTip.ts new file mode 100644 index 00000000000..743c2620f7d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/FullTip.ts @@ -0,0 +1,134 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SupporterReference } from './SupporterReference'; +import { + SupporterReferenceFromJSON, + SupporterReferenceFromJSONTyped, + SupporterReferenceToJSON, +} from './SupporterReference'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; + +/** + * + * @export + * @interface FullTip + */ +export interface FullTip { + /** + * + * @type {string} + * @memberof FullTip + */ + amount: string; + /** + * + * @type {User} + * @memberof FullTip + */ + sender: User; + /** + * + * @type {User} + * @memberof FullTip + */ + receiver: User; + /** + * + * @type {string} + * @memberof FullTip + */ + createdAt: string; + /** + * + * @type {number} + * @memberof FullTip + */ + slot: number; + /** + * + * @type {Array} + * @memberof FullTip + */ + followeeSupporters: Array; + /** + * + * @type {string} + * @memberof FullTip + */ + txSignature: string; +} + +/** + * Check if a given object implements the FullTip interface. + */ +export function instanceOfFullTip(value: object): value is FullTip { + 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; +} + +export function FullTipFromJSON(json: any): FullTip { + return FullTipFromJSONTyped(json, false); +} + +export function FullTipFromJSONTyped(json: any, ignoreDiscriminator: boolean): FullTip { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'amount': json['amount'], + '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'], + }; +} + +export function FullTipToJSON(value?: FullTip | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'amount': value.amount, + '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/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/HistoryResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/HistoryResponseFull.ts new file mode 100644 index 00000000000..f1da25d7d4b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/HistoryResponseFull.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 HistoryResponseFull + */ +export interface HistoryResponseFull { + /** + * + * @type {number} + * @memberof HistoryResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof HistoryResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof HistoryResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof HistoryResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof HistoryResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof HistoryResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof HistoryResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof HistoryResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the HistoryResponseFull interface. + */ +export function instanceOfHistoryResponseFull(value: object): value is HistoryResponseFull { + 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 HistoryResponseFullFromJSON(json: any): HistoryResponseFull { + return HistoryResponseFullFromJSONTyped(json, false); +} + +export function HistoryResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): HistoryResponseFull { + 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 HistoryResponseFullToJSON(value?: HistoryResponseFull | 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/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/MediaLink.ts b/packages/sdk/src/sdk/api/generated/default/models/MediaLink.ts new file mode 100644 index 00000000000..7f5b4eed8b3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/MediaLink.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface MediaLink + */ +export interface MediaLink { + /** + * + * @type {string} + * @memberof MediaLink + */ + url?: string; + /** + * + * @type {Array} + * @memberof MediaLink + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the MediaLink interface. + */ +export function instanceOfMediaLink(value: object): value is MediaLink { + let isInstance = true; + + return isInstance; +} + +export function MediaLinkFromJSON(json: any): MediaLink { + return MediaLinkFromJSONTyped(json, false); +} + +export function MediaLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaLink { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'url': !exists(json, 'url') ? undefined : json['url'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function MediaLinkToJSON(value?: MediaLink | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'url': value.url, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/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/Playlist.ts b/packages/sdk/src/sdk/api/generated/default/models/Playlist.ts index 9ae67a5bbd4..b3dfdcb0e42 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Playlist.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Playlist.ts @@ -20,6 +20,18 @@ import { 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, @@ -32,6 +44,18 @@ import { 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, @@ -141,6 +165,150 @@ export interface Playlist { * @memberof Playlist */ trackCount: number; + /** + * + * @type {number} + * @memberof Playlist + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof Playlist + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof Playlist + */ + followeeReposts: Array; + /** + * + * @type {Array} + * @memberof Playlist + */ + followeeFavorites: Array; + /** + * + * @type {boolean} + * @memberof Playlist + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof Playlist + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof Playlist + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof Playlist + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof Playlist + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof Playlist + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof Playlist + */ + userId: string; + /** + * + * @type {Array} + * @memberof Playlist + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof Playlist + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof Playlist + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof Playlist + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof Playlist + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof Playlist + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof Playlist + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof Playlist + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof Playlist + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof Playlist + */ + artists?: Array; + /** + * + * @type {object} + * @memberof Playlist + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof Playlist + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof Playlist + */ + parentalWarningType?: string; } /** @@ -160,6 +328,19 @@ export function instanceOfPlaylist(value: object): value is Playlist { 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; } @@ -190,6 +371,30 @@ export function PlaylistFromJSONTyped(json: any, ignoreDiscriminator: boolean): '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'], }; } @@ -218,6 +423,30 @@ export function PlaylistToJSON(value?: Playlist | null): any { '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/PlaylistArtworkFull.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtworkFull.ts new file mode 100644 index 00000000000..3fa04fdb230 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistArtworkFull.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PlaylistArtworkFull + */ +export interface PlaylistArtworkFull { + /** + * + * @type {string} + * @memberof PlaylistArtworkFull + */ + _150x150?: string; + /** + * + * @type {string} + * @memberof PlaylistArtworkFull + */ + _480x480?: string; + /** + * + * @type {string} + * @memberof PlaylistArtworkFull + */ + _1000x1000?: string; + /** + * + * @type {Array} + * @memberof PlaylistArtworkFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the PlaylistArtworkFull interface. + */ +export function instanceOfPlaylistArtworkFull(value: object): value is PlaylistArtworkFull { + let isInstance = true; + + return isInstance; +} + +export function PlaylistArtworkFullFromJSON(json: any): PlaylistArtworkFull { + return PlaylistArtworkFullFromJSONTyped(json, false); +} + +export function PlaylistArtworkFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistArtworkFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_150x150': !exists(json, '150x150') ? undefined : json['150x150'], + '_480x480': !exists(json, '480x480') ? undefined : json['480x480'], + '_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function PlaylistArtworkFullToJSON(value?: PlaylistArtworkFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '150x150': value._150x150, + '480x480': value._480x480, + '1000x1000': value._1000x1000, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PlaylistFeedItem.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFeedItem.ts new file mode 100644 index 00000000000..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/PlaylistFull.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFull.ts new file mode 100644 index 00000000000..483fcff9f08 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFull.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 PlaylistFull + */ +export interface PlaylistFull { + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistFull + */ + artwork?: PlaylistArtwork; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + description?: string; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + permalink: string; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + id: string; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + totalPlayCount: number; + /** + * + * @type {User} + * @memberof PlaylistFull + */ + user: User; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof PlaylistFull + */ + access: Access; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + upc?: string; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + trackCount: number; + /** + * + * @type {number} + * @memberof PlaylistFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + followeeReposts: Array; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + followeeFavorites: Array; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof PlaylistFull + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + userId: string; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistFull + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof PlaylistFull + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof PlaylistFull + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof PlaylistFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof PlaylistFull + */ + artists?: Array; + /** + * + * @type {object} + * @memberof PlaylistFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof PlaylistFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof PlaylistFull + */ + parentalWarningType?: string; +} + +/** + * Check if a given object implements the PlaylistFull interface. + */ +export function instanceOfPlaylistFull(value: object): value is PlaylistFull { + let isInstance = true; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "isImageAutogenerated" in value && value["isImageAutogenerated"] !== undefined; + isInstance = isInstance && "playlistName" in value && value["playlistName"] !== undefined; + isInstance = isInstance && "playlistContents" in value && value["playlistContents"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "totalPlayCount" in value && value["totalPlayCount"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "followeeReposts" in value && value["followeeReposts"] !== undefined; + isInstance = isInstance && "followeeFavorites" in value && value["followeeFavorites"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isPrivate" in value && value["isPrivate"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "addedTimestamps" in value && value["addedTimestamps"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + + return isInstance; +} + +export function PlaylistFullFromJSON(json: any): PlaylistFull { + return PlaylistFullFromJSONTyped(json, false); +} + +export function PlaylistFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : 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 PlaylistFullToJSON(value?: PlaylistFull | 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/PlaylistFullWithoutTracks.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFullWithoutTracks.ts new file mode 100644 index 00000000000..ebfaa7e1f21 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistFullWithoutTracks.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 PlaylistFullWithoutTracks + */ +export interface PlaylistFullWithoutTracks { + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistFullWithoutTracks + */ + artwork?: PlaylistArtwork; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + description?: string; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + permalink: string; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + id: string; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + repostCount: number; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + totalPlayCount: number; + /** + * + * @type {User} + * @memberof PlaylistFullWithoutTracks + */ + user: User; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof PlaylistFullWithoutTracks + */ + access: Access; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + upc?: string; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + trackCount: number; + /** + * + * @type {number} + * @memberof PlaylistFullWithoutTracks + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + followeeReposts: Array; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + followeeFavorites: Array; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + userId: string; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof PlaylistFullWithoutTracks + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof PlaylistFullWithoutTracks + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof PlaylistFullWithoutTracks + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof PlaylistFullWithoutTracks + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof PlaylistFullWithoutTracks + */ + artists?: Array; + /** + * + * @type {object} + * @memberof PlaylistFullWithoutTracks + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof PlaylistFullWithoutTracks + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof PlaylistFullWithoutTracks + */ + parentalWarningType?: string; +} + +/** + * Check if a given object implements the PlaylistFullWithoutTracks interface. + */ +export function instanceOfPlaylistFullWithoutTracks(value: object): value is PlaylistFullWithoutTracks { + let isInstance = true; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "isImageAutogenerated" in value && value["isImageAutogenerated"] !== undefined; + isInstance = isInstance && "playlistName" in value && value["playlistName"] !== undefined; + isInstance = isInstance && "playlistContents" in value && value["playlistContents"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "totalPlayCount" in value && value["totalPlayCount"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "followeeReposts" in value && value["followeeReposts"] !== undefined; + isInstance = isInstance && "followeeFavorites" in value && value["followeeFavorites"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isPrivate" in value && value["isPrivate"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "addedTimestamps" in value && value["addedTimestamps"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + + return isInstance; +} + +export function PlaylistFullWithoutTracksFromJSON(json: any): PlaylistFullWithoutTracks { + return PlaylistFullWithoutTracksFromJSONTyped(json, false); +} + +export function PlaylistFullWithoutTracksFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistFullWithoutTracks { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : 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 PlaylistFullWithoutTracksToJSON(value?: PlaylistFullWithoutTracks | 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/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..d12ac448def --- /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; +} + +/** + * 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/PlaylistsResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/PlaylistsResponseFull.ts new file mode 100644 index 00000000000..92a2ca3b768 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PlaylistsResponseFull.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 { PlaylistWithoutTracks } from './PlaylistWithoutTracks'; +import { + PlaylistWithoutTracksFromJSON, + PlaylistWithoutTracksFromJSONTyped, + PlaylistWithoutTracksToJSON, +} from './PlaylistWithoutTracks'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface PlaylistsResponseFull + */ +export interface PlaylistsResponseFull { + /** + * + * @type {number} + * @memberof PlaylistsResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof PlaylistsResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof PlaylistsResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof PlaylistsResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof PlaylistsResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof PlaylistsResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof PlaylistsResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof PlaylistsResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the PlaylistsResponseFull interface. + */ +export function instanceOfPlaylistsResponseFull(value: object): value is PlaylistsResponseFull { + 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 PlaylistsResponseFullFromJSON(json: any): PlaylistsResponseFull { + return PlaylistsResponseFullFromJSONTyped(json, false); +} + +export function PlaylistsResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistsResponseFull { + 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(PlaylistWithoutTracksFromJSON)), + }; +} + +export function PlaylistsResponseFullToJSON(value?: PlaylistsResponseFull | 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(PlaylistWithoutTracksToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ProfilePictureFull.ts b/packages/sdk/src/sdk/api/generated/default/models/ProfilePictureFull.ts new file mode 100644 index 00000000000..2cacd5e1fe5 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ProfilePictureFull.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ProfilePictureFull + */ +export interface ProfilePictureFull { + /** + * + * @type {string} + * @memberof ProfilePictureFull + */ + _150x150?: string; + /** + * + * @type {string} + * @memberof ProfilePictureFull + */ + _480x480?: string; + /** + * + * @type {string} + * @memberof ProfilePictureFull + */ + _1000x1000?: string; + /** + * + * @type {Array} + * @memberof ProfilePictureFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the ProfilePictureFull interface. + */ +export function instanceOfProfilePictureFull(value: object): value is ProfilePictureFull { + let isInstance = true; + + return isInstance; +} + +export function ProfilePictureFullFromJSON(json: any): ProfilePictureFull { + return ProfilePictureFullFromJSONTyped(json, false); +} + +export function ProfilePictureFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProfilePictureFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_150x150': !exists(json, '150x150') ? undefined : json['150x150'], + '_480x480': !exists(json, '480x480') ? undefined : json['480x480'], + '_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function ProfilePictureFullToJSON(value?: ProfilePictureFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '150x150': value._150x150, + '480x480': value._480x480, + '1000x1000': value._1000x1000, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/Purchase.ts b/packages/sdk/src/sdk/api/generated/default/models/Purchase.ts new file mode 100644 index 00000000000..591c0673030 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Purchase.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PurchaseSplit } from './PurchaseSplit'; +import { + PurchaseSplitFromJSON, + PurchaseSplitFromJSONTyped, + PurchaseSplitToJSON, +} from './PurchaseSplit'; + +import { +} from './'; + +/** + * + * @export + * @interface Purchase + */ +export interface Purchase { + /** + * + * @type {number} + * @memberof Purchase + */ + slot: number; + /** + * + * @type {string} + * @memberof Purchase + */ + signature: string; + /** + * + * @type {string} + * @memberof Purchase + */ + sellerUserId: string; + /** + * + * @type {string} + * @memberof Purchase + */ + buyerUserId: string; + /** + * + * @type {string} + * @memberof Purchase + */ + amount: string; + /** + * + * @type {string} + * @memberof Purchase + */ + extraAmount: string; + /** + * + * @type {string} + * @memberof Purchase + */ + contentType: string; + /** + * + * @type {string} + * @memberof Purchase + */ + contentId: string; + /** + * + * @type {string} + * @memberof Purchase + */ + createdAt: string; + /** + * + * @type {string} + * @memberof Purchase + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof Purchase + */ + access: string; + /** + * + * @type {Array} + * @memberof Purchase + */ + splits: Array; +} + +/** + * Check if a given object implements the Purchase interface. + */ +export function instanceOfPurchase(value: object): value is Purchase { + let isInstance = true; + isInstance = isInstance && "slot" in value && value["slot"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "sellerUserId" in value && value["sellerUserId"] !== undefined; + isInstance = isInstance && "buyerUserId" in value && value["buyerUserId"] !== undefined; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "extraAmount" in value && value["extraAmount"] !== undefined; + isInstance = isInstance && "contentType" in value && value["contentType"] !== undefined; + isInstance = isInstance && "contentId" in value && value["contentId"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "splits" in value && value["splits"] !== undefined; + + return isInstance; +} + +export function PurchaseFromJSON(json: any): Purchase { + return PurchaseFromJSONTyped(json, false); +} + +export function PurchaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Purchase { + if ((json === undefined) || (json === null)) { + return json; + } + if (!ignoreDiscriminator) { + } + return { + + 'slot': json['slot'], + 'signature': json['signature'], + 'sellerUserId': json['seller_user_id'], + 'buyerUserId': json['buyer_user_id'], + 'amount': json['amount'], + 'extraAmount': json['extra_amount'], + 'contentType': json['content_type'], + 'contentId': json['content_id'], + 'createdAt': json['created_at'], + 'updatedAt': json['updated_at'], + 'access': json['access'], + 'splits': ((json['splits'] as Array).map(PurchaseSplitFromJSON)), + }; +} + +export function PurchaseToJSON(value?: Purchase | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'slot': value.slot, + 'signature': value.signature, + 'seller_user_id': value.sellerUserId, + 'buyer_user_id': value.buyerUserId, + 'amount': value.amount, + 'extra_amount': value.extraAmount, + 'content_type': value.contentType, + 'content_id': value.contentId, + 'created_at': value.createdAt, + 'updated_at': value.updatedAt, + 'access': value.access, + 'splits': ((value.splits as Array).map(PurchaseSplitToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/Reactions.ts b/packages/sdk/src/sdk/api/generated/default/models/Reactions.ts new file mode 100644 index 00000000000..2c0a6cb8745 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Reactions.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Reaction } from './Reaction'; +import { + ReactionFromJSON, + ReactionFromJSONTyped, + ReactionToJSON, +} from './Reaction'; + +/** + * + * @export + * @interface Reactions + */ +export interface Reactions { + /** + * + * @type {Array} + * @memberof Reactions + */ + data?: Array; +} + +/** + * Check if a given object implements the Reactions interface. + */ +export function instanceOfReactions(value: object): value is Reactions { + let isInstance = true; + + return isInstance; +} + +export function ReactionsFromJSON(json: any): Reactions { + return ReactionsFromJSONTyped(json, false); +} + +export function ReactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Reactions { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(ReactionFromJSON)), + }; +} + +export function ReactionsToJSON(value?: Reactions | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': value.data === undefined ? undefined : ((value.data as Array).map(ReactionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotification.ts new file mode 100644 index 00000000000..c9450e275ce --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ReceiveTipNotificationAction } from './ReceiveTipNotificationAction'; +import { + ReceiveTipNotificationActionFromJSON, + ReceiveTipNotificationActionFromJSONTyped, + ReceiveTipNotificationActionToJSON, +} from './ReceiveTipNotificationAction'; + +/** + * + * @export + * @interface ReceiveTipNotification + */ +export interface ReceiveTipNotification { + /** + * + * @type {string} + * @memberof ReceiveTipNotification + */ + type: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof ReceiveTipNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof ReceiveTipNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof ReceiveTipNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the ReceiveTipNotification interface. + */ +export function instanceOfReceiveTipNotification(value: object): value is ReceiveTipNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function ReceiveTipNotificationFromJSON(json: any): ReceiveTipNotification { + return ReceiveTipNotificationFromJSONTyped(json, false); +} + +export function ReceiveTipNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReceiveTipNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(ReceiveTipNotificationActionFromJSON)), + }; +} + +export function ReceiveTipNotificationToJSON(value?: ReceiveTipNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(ReceiveTipNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationAction.ts new file mode 100644 index 00000000000..54d49fc94e3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ReceiveTipNotificationActionData } from './ReceiveTipNotificationActionData'; +import { + ReceiveTipNotificationActionDataFromJSON, + ReceiveTipNotificationActionDataFromJSONTyped, + ReceiveTipNotificationActionDataToJSON, +} from './ReceiveTipNotificationActionData'; + +/** + * + * @export + * @interface ReceiveTipNotificationAction + */ +export interface ReceiveTipNotificationAction { + /** + * + * @type {string} + * @memberof ReceiveTipNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof ReceiveTipNotificationAction + */ + timestamp: number; + /** + * + * @type {ReceiveTipNotificationActionData} + * @memberof ReceiveTipNotificationAction + */ + data: ReceiveTipNotificationActionData; +} + +/** + * Check if a given object implements the ReceiveTipNotificationAction interface. + */ +export function instanceOfReceiveTipNotificationAction(value: object): value is ReceiveTipNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function ReceiveTipNotificationActionFromJSON(json: any): ReceiveTipNotificationAction { + return ReceiveTipNotificationActionFromJSONTyped(json, false); +} + +export function ReceiveTipNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReceiveTipNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': ReceiveTipNotificationActionDataFromJSON(json['data']), + }; +} + +export function ReceiveTipNotificationActionToJSON(value?: ReceiveTipNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': ReceiveTipNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationActionData.ts new file mode 100644 index 00000000000..cea1714fccc --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/ReceiveTipNotificationActionData.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ReceiveTipNotificationActionData + */ +export interface ReceiveTipNotificationActionData { + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + receiverUserId: string; + /** + * + * @type {string} + * @memberof ReceiveTipNotificationActionData + */ + tipTxSignature: string; + /** + * + * @type {number} + * @memberof ReceiveTipNotificationActionData + */ + reactionValue: number; +} + +/** + * Check if a given object implements the ReceiveTipNotificationActionData interface. + */ +export function instanceOfReceiveTipNotificationActionData(value: object): value is ReceiveTipNotificationActionData { + let isInstance = true; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "receiverUserId" in value && value["receiverUserId"] !== undefined; + isInstance = isInstance && "tipTxSignature" in value && value["tipTxSignature"] !== undefined; + isInstance = isInstance && "reactionValue" in value && value["reactionValue"] !== undefined; + + return isInstance; +} + +export function ReceiveTipNotificationActionDataFromJSON(json: any): ReceiveTipNotificationActionData { + return ReceiveTipNotificationActionDataFromJSONTyped(json, false); +} + +export function ReceiveTipNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReceiveTipNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'amount': json['amount'], + 'senderUserId': json['sender_user_id'], + 'receiverUserId': json['receiver_user_id'], + 'tipTxSignature': json['tip_tx_signature'], + 'reactionValue': json['reaction_value'], + }; +} + +export function ReceiveTipNotificationActionDataToJSON(value?: ReceiveTipNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'amount': value.amount, + 'sender_user_id': value.senderUserId, + 'receiver_user_id': value.receiverUserId, + 'tip_tx_signature': value.tipTxSignature, + 'reaction_value': value.reactionValue, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/RelatedArtistResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/RelatedArtistResponseFull.ts new file mode 100644 index 00000000000..a6ce9467735 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RelatedArtistResponseFull.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 RelatedArtistResponseFull + */ +export interface RelatedArtistResponseFull { + /** + * + * @type {number} + * @memberof RelatedArtistResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof RelatedArtistResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof RelatedArtistResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof RelatedArtistResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof RelatedArtistResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof RelatedArtistResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof RelatedArtistResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof RelatedArtistResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the RelatedArtistResponseFull interface. + */ +export function instanceOfRelatedArtistResponseFull(value: object): value is RelatedArtistResponseFull { + 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 RelatedArtistResponseFullFromJSON(json: any): RelatedArtistResponseFull { + return RelatedArtistResponseFullFromJSONTyped(json, false); +} + +export function RelatedArtistResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): RelatedArtistResponseFull { + 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 RelatedArtistResponseFullToJSON(value?: RelatedArtistResponseFull | 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/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/RemixesResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixesResponse.ts new file mode 100644 index 00000000000..7f0e20e298e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixesResponse.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 { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; + +/** + * + * @export + * @interface RemixesResponse + */ +export interface RemixesResponse { + /** + * + * @type {number} + * @memberof RemixesResponse + */ + count: number; + /** + * + * @type {Array} + * @memberof RemixesResponse + */ + tracks?: Array; +} + +/** + * Check if a given object implements the RemixesResponse interface. + */ +export function instanceOfRemixesResponse(value: object): value is RemixesResponse { + let isInstance = true; + isInstance = isInstance && "count" in value && value["count"] !== undefined; + + return isInstance; +} + +export function RemixesResponseFromJSON(json: any): RemixesResponse { + return RemixesResponseFromJSONTyped(json, false); +} + +export function RemixesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemixesResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': json['count'], + 'tracks': !exists(json, 'tracks') ? undefined : ((json['tracks'] as Array).map(TrackFromJSON)), + }; +} + +export function RemixesResponseToJSON(value?: RemixesResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'tracks': value.tracks === undefined ? undefined : ((value.tracks as Array).map(TrackToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/RemixingResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/RemixingResponse.ts new file mode 100644 index 00000000000..009a0c339cb --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/RemixingResponse.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 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} + * @memberof RemixingResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the RemixingResponse interface. + */ +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; +} + +export function RemixingResponseFromJSON(json: any): RemixingResponse { + return RemixingResponseFromJSONTyped(json, false); +} + +export function RemixingResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemixingResponse { + 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 RemixingResponseToJSON(value?: RemixingResponse | 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/Repost.ts b/packages/sdk/src/sdk/api/generated/default/models/Repost.ts new file mode 100644 index 00000000000..2b842bb5616 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/Repost.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 Repost + */ +export interface Repost { + /** + * + * @type {string} + * @memberof Repost + */ + repostItemId: string; + /** + * + * @type {string} + * @memberof Repost + */ + repostType: string; + /** + * + * @type {string} + * @memberof Repost + */ + userId: string; +} + +/** + * Check if a given object implements the Repost interface. + */ +export function instanceOfRepost(value: object): value is Repost { + let isInstance = true; + isInstance = isInstance && "repostItemId" in value && value["repostItemId"] !== undefined; + isInstance = isInstance && "repostType" in value && value["repostType"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + + return isInstance; +} + +export function RepostFromJSON(json: any): Repost { + return RepostFromJSONTyped(json, false); +} + +export function RepostFromJSONTyped(json: any, ignoreDiscriminator: boolean): Repost { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'repostItemId': json['repost_item_id'], + 'repostType': json['repost_type'], + 'userId': json['user_id'], + }; +} + +export function RepostToJSON(value?: Repost | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'repost_item_id': value.repostItemId, + 'repost_type': value.repostType, + 'user_id': value.userId, + }; +} + 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/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..1bfa73031de --- /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; +} + +/** + * 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/SearchPlaylistFull.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylistFull.ts new file mode 100644 index 00000000000..e91ae6783ec --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchPlaylistFull.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 SearchPlaylistFull + */ +export interface SearchPlaylistFull { + /** + * + * @type {PlaylistArtwork} + * @memberof SearchPlaylistFull + */ + artwork?: PlaylistArtwork; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + description?: string; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + permalink: string; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + id: string; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isAlbum: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isImageAutogenerated: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + playlistName: string; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + playlistContents: Array; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + totalPlayCount: number; + /** + * + * @type {User} + * @memberof SearchPlaylistFull + */ + user: User; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + ddexApp?: string; + /** + * + * @type {Access} + * @memberof SearchPlaylistFull + */ + access: Access; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + upc?: string; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + trackCount: number; + /** + * + * @type {number} + * @memberof SearchPlaylistFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + createdAt: string; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + followeeReposts?: Array; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + followeeFavorites?: Array; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isDelete: boolean; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isPrivate: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + updatedAt: string; + /** + * DEPRECATED. Use playlist_contents instead. + * @type {Array} + * @memberof SearchPlaylistFull + */ + addedTimestamps: Array; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + userId: string; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + tracks?: Array; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + coverArt?: string; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + coverArtSizes?: string; + /** + * + * @type {PlaylistArtwork} + * @memberof SearchPlaylistFull + */ + coverArtCids?: PlaylistArtwork; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof SearchPlaylistFull + */ + streamConditions?: AccessGate; + /** + * + * @type {boolean} + * @memberof SearchPlaylistFull + */ + isScheduledRelease: boolean; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + releaseDate?: string; + /** + * + * @type {object} + * @memberof SearchPlaylistFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof SearchPlaylistFull + */ + artists?: Array; + /** + * + * @type {object} + * @memberof SearchPlaylistFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof SearchPlaylistFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof SearchPlaylistFull + */ + parentalWarningType?: string; +} + +/** + * Check if a given object implements the SearchPlaylistFull interface. + */ +export function instanceOfSearchPlaylistFull(value: object): value is SearchPlaylistFull { + let isInstance = true; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isAlbum" in value && value["isAlbum"] !== undefined; + isInstance = isInstance && "isImageAutogenerated" in value && value["isImageAutogenerated"] !== undefined; + isInstance = isInstance && "playlistName" in value && value["playlistName"] !== undefined; + isInstance = isInstance && "playlistContents" in value && value["playlistContents"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "totalPlayCount" in value && value["totalPlayCount"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isPrivate" in value && value["isPrivate"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "addedTimestamps" in value && value["addedTimestamps"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + + return isInstance; +} + +export function SearchPlaylistFullFromJSON(json: any): SearchPlaylistFull { + return SearchPlaylistFullFromJSONTyped(json, false); +} + +export function SearchPlaylistFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchPlaylistFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': !exists(json, 'artwork') ? undefined : 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 SearchPlaylistFullToJSON(value?: SearchPlaylistFull | 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..bf9732ac27e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchTrack.ts @@ -0,0 +1,812 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { AlbumBacklink } from './AlbumBacklink'; +import { + AlbumBacklinkFromJSON, + AlbumBacklinkFromJSONTyped, + AlbumBacklinkToJSON, +} from './AlbumBacklink'; +import type { CoverArt } from './CoverArt'; +import { + CoverArtFromJSON, + CoverArtFromJSONTyped, + CoverArtToJSON, +} from './CoverArt'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; +import type { 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 {string} + * @memberof SearchTrack + */ + releaseDate?: string; + /** + * + * @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; + /** + * + * @type {Array} + * @memberof SearchTrack + */ + indirectResourceContributors?: Array; + /** + * + * @type {object} + * @memberof SearchTrack + */ + rightsController?: object; + /** + * + * @type {object} + * @memberof SearchTrack + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof SearchTrack + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof SearchTrack + */ + parentalWarningType?: string; + /** + * 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 : 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'], + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : json['indirect_resource_contributors'], + 'rightsController': !exists(json, 'rights_controller') ? undefined : json['rights_controller'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isDownloadGated': json['is_download_gated'], + 'downloadConditions': !exists(json, 'download_conditions') ? undefined : AccessGateFromJSON(json['download_conditions']), + 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], + 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], + 'isOwnedByUser': json['is_owned_by_user'], + 'stream': UrlWithMirrorsFromJSON(json['stream']), + 'download': UrlWithMirrorsFromJSON(json['download']), + 'preview': UrlWithMirrorsFromJSON(json['preview']), + }; +} + +export function 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, + '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, + 'indirect_resource_contributors': value.indirectResourceContributors, + 'rights_controller': value.rightsController, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_download_gated': value.isDownloadGated, + 'download_conditions': AccessGateToJSON(value.downloadConditions), + 'cover_original_song_title': value.coverOriginalSongTitle, + 'cover_original_artist': value.coverOriginalArtist, + 'is_owned_by_user': value.isOwnedByUser, + 'stream': UrlWithMirrorsToJSON(value.stream), + 'download': UrlWithMirrorsToJSON(value.download), + 'preview': UrlWithMirrorsToJSON(value.preview), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SearchTrackFull.ts b/packages/sdk/src/sdk/api/generated/default/models/SearchTrackFull.ts new file mode 100644 index 00000000000..0b0a697dc4b --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SearchTrackFull.ts @@ -0,0 +1,812 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { AlbumBacklink } from './AlbumBacklink'; +import { + AlbumBacklinkFromJSON, + AlbumBacklinkFromJSONTyped, + AlbumBacklinkToJSON, +} from './AlbumBacklink'; +import type { CoverArt } from './CoverArt'; +import { + CoverArtFromJSON, + CoverArtFromJSONTyped, + CoverArtToJSON, +} from './CoverArt'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; +import type { 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 SearchTrackFull + */ +export interface SearchTrackFull { + /** + * + * @type {TrackArtwork} + * @memberof SearchTrackFull + */ + artwork: TrackArtwork; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + description?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + genre: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + id: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + trackCid?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + previewCid?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + origFileCid?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + origFilename?: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isOriginalAvailable: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + mood?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + releaseDate?: string; + /** + * + * @type {RemixParent} + * @memberof SearchTrackFull + */ + remixOf: RemixParent; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + commentCount: number; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + tags?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + title: string; + /** + * + * @type {User} + * @memberof SearchTrackFull + */ + user: User; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + duration: number; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isDownloadable: boolean; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + playCount: number; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + permalink: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isStreamable?: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + ddexApp?: string; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + playlistsContainingTrack?: Array; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + pinnedCommentId?: number; + /** + * + * @type {AlbumBacklink} + * @memberof SearchTrackFull + */ + albumBacklink?: AlbumBacklink; + /** + * Describes what access the given user has + * @type {Access} + * @memberof SearchTrackFull + */ + access: Access; + /** + * The blocknumber this track was last updated + * @type {number} + * @memberof SearchTrackFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + createDate?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverArtSizes: string; + /** + * + * @type {CoverArt} + * @memberof SearchTrackFull + */ + coverArtCids?: CoverArt; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + createdAt: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + creditsSplits?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + isrc?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + license?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + iswc?: string; + /** + * + * @type {FieldVisibility} + * @memberof SearchTrackFull + */ + fieldVisibility: FieldVisibility; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + followeeReposts?: Array; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isScheduledRelease: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isUnlisted: boolean; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + followeeFavorites?: Array; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + routeId: string; + /** + * + * @type {StemParent} + * @memberof SearchTrackFull + */ + stemOf?: StemParent; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + trackSegments: Array; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + userId: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isDelete: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverArt?: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isAvailable: boolean; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + aiAttributionUserId?: number; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + allowedApiKeys?: Array; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + audioUploadId?: string; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + previewStartSeconds?: number; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + bpm?: number; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isCustomBpm?: boolean; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + musicalKey?: string; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + isCustomMusicalKey?: boolean; + /** + * + * @type {number} + * @memberof SearchTrackFull + */ + audioAnalysisErrorCount?: number; + /** + * + * @type {boolean} + * @memberof SearchTrackFull + */ + commentsDisabled?: boolean; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + artists?: Array; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + resourceContributors?: Array; + /** + * + * @type {Array} + * @memberof SearchTrackFull + */ + indirectResourceContributors?: Array; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + rightsController?: object; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof SearchTrackFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + parentalWarningType?: string; + /** + * Whether or not the owner has restricted streaming behind an access gate + * @type {boolean} + * @memberof SearchTrackFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof SearchTrackFull + */ + streamConditions?: AccessGate; + /** + * Whether or not the owner has restricted downloading behind an access gate + * @type {boolean} + * @memberof SearchTrackFull + */ + isDownloadGated: boolean; + /** + * How to unlock the track download + * @type {AccessGate} + * @memberof SearchTrackFull + */ + downloadConditions?: AccessGate; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverOriginalSongTitle?: string; + /** + * + * @type {string} + * @memberof SearchTrackFull + */ + coverOriginalArtist?: string; + /** + * Indicates whether the track is owned by the user for MRI sake + * @type {boolean} + * @memberof SearchTrackFull + */ + isOwnedByUser: boolean; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrackFull + */ + stream: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrackFull + */ + download: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof SearchTrackFull + */ + preview: UrlWithMirrors; +} + +/** + * Check if a given object implements the SearchTrackFull interface. + */ +export function instanceOfSearchTrackFull(value: object): value is SearchTrackFull { + let isInstance = true; + isInstance = isInstance && "artwork" in value && value["artwork"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isOriginalAvailable" in value && value["isOriginalAvailable"] !== undefined; + isInstance = isInstance && "remixOf" in value && value["remixOf"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "commentCount" in value && value["commentCount"] !== undefined; + isInstance = isInstance && "title" in value && value["title"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "duration" in value && value["duration"] !== undefined; + isInstance = isInstance && "isDownloadable" in value && value["isDownloadable"] !== undefined; + isInstance = isInstance && "playCount" in value && value["playCount"] !== undefined; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "coverArtSizes" in value && value["coverArtSizes"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "fieldVisibility" in value && value["fieldVisibility"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + isInstance = isInstance && "isUnlisted" in value && value["isUnlisted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "routeId" in value && value["routeId"] !== undefined; + isInstance = isInstance && "trackSegments" in value && value["trackSegments"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isAvailable" in value && value["isAvailable"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isDownloadGated" in value && value["isDownloadGated"] !== undefined; + isInstance = isInstance && "isOwnedByUser" in value && value["isOwnedByUser"] !== undefined; + isInstance = isInstance && "stream" in value && value["stream"] !== undefined; + isInstance = isInstance && "download" in value && value["download"] !== undefined; + isInstance = isInstance && "preview" in value && value["preview"] !== undefined; + + return isInstance; +} + +export function SearchTrackFullFromJSON(json: any): SearchTrackFull { + return SearchTrackFullFromJSONTyped(json, false); +} + +export function SearchTrackFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchTrackFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': 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 : 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'], + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : json['indirect_resource_contributors'], + 'rightsController': !exists(json, 'rights_controller') ? undefined : json['rights_controller'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isDownloadGated': json['is_download_gated'], + 'downloadConditions': !exists(json, 'download_conditions') ? undefined : AccessGateFromJSON(json['download_conditions']), + 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], + 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], + 'isOwnedByUser': json['is_owned_by_user'], + 'stream': UrlWithMirrorsFromJSON(json['stream']), + 'download': UrlWithMirrorsFromJSON(json['download']), + 'preview': UrlWithMirrorsFromJSON(json['preview']), + }; +} + +export function SearchTrackFullToJSON(value?: SearchTrackFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': 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, + '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, + 'indirect_resource_contributors': value.indirectResourceContributors, + 'rights_controller': value.rightsController, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_download_gated': value.isDownloadGated, + 'download_conditions': AccessGateToJSON(value.downloadConditions), + 'cover_original_song_title': value.coverOriginalSongTitle, + 'cover_original_artist': value.coverOriginalArtist, + 'is_owned_by_user': value.isOwnedByUser, + 'stream': UrlWithMirrorsToJSON(value.stream), + 'download': UrlWithMirrorsToJSON(value.download), + 'preview': UrlWithMirrorsToJSON(value.preview), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SendTipNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotification.ts new file mode 100644 index 00000000000..ce560d3efd2 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SendTipNotificationAction } from './SendTipNotificationAction'; +import { + SendTipNotificationActionFromJSON, + SendTipNotificationActionFromJSONTyped, + SendTipNotificationActionToJSON, +} from './SendTipNotificationAction'; + +/** + * + * @export + * @interface SendTipNotification + */ +export interface SendTipNotification { + /** + * + * @type {string} + * @memberof SendTipNotification + */ + type: string; + /** + * + * @type {string} + * @memberof SendTipNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof SendTipNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof SendTipNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof SendTipNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the SendTipNotification interface. + */ +export function instanceOfSendTipNotification(value: object): value is SendTipNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function SendTipNotificationFromJSON(json: any): SendTipNotification { + return SendTipNotificationFromJSONTyped(json, false); +} + +export function SendTipNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTipNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(SendTipNotificationActionFromJSON)), + }; +} + +export function SendTipNotificationToJSON(value?: SendTipNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(SendTipNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationAction.ts new file mode 100644 index 00000000000..e7d4797bbf0 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SendTipNotificationActionData } from './SendTipNotificationActionData'; +import { + SendTipNotificationActionDataFromJSON, + SendTipNotificationActionDataFromJSONTyped, + SendTipNotificationActionDataToJSON, +} from './SendTipNotificationActionData'; + +/** + * + * @export + * @interface SendTipNotificationAction + */ +export interface SendTipNotificationAction { + /** + * + * @type {string} + * @memberof SendTipNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof SendTipNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof SendTipNotificationAction + */ + timestamp: number; + /** + * + * @type {SendTipNotificationActionData} + * @memberof SendTipNotificationAction + */ + data: SendTipNotificationActionData; +} + +/** + * Check if a given object implements the SendTipNotificationAction interface. + */ +export function instanceOfSendTipNotificationAction(value: object): value is SendTipNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function SendTipNotificationActionFromJSON(json: any): SendTipNotificationAction { + return SendTipNotificationActionFromJSONTyped(json, false); +} + +export function SendTipNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTipNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': SendTipNotificationActionDataFromJSON(json['data']), + }; +} + +export function SendTipNotificationActionToJSON(value?: SendTipNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': SendTipNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationActionData.ts new file mode 100644 index 00000000000..096702d3244 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/SendTipNotificationActionData.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SendTipNotificationActionData + */ +export interface SendTipNotificationActionData { + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + amount: string; + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + senderUserId: string; + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + receiverUserId: string; + /** + * + * @type {string} + * @memberof SendTipNotificationActionData + */ + tipTxSignature: string; +} + +/** + * Check if a given object implements the SendTipNotificationActionData interface. + */ +export function instanceOfSendTipNotificationActionData(value: object): value is SendTipNotificationActionData { + let isInstance = true; + isInstance = isInstance && "amount" in value && value["amount"] !== undefined; + isInstance = isInstance && "senderUserId" in value && value["senderUserId"] !== undefined; + isInstance = isInstance && "receiverUserId" in value && value["receiverUserId"] !== undefined; + isInstance = isInstance && "tipTxSignature" in value && value["tipTxSignature"] !== undefined; + + return isInstance; +} + +export function SendTipNotificationActionDataFromJSON(json: any): SendTipNotificationActionData { + return SendTipNotificationActionDataFromJSONTyped(json, false); +} + +export function SendTipNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTipNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'amount': json['amount'], + 'senderUserId': json['sender_user_id'], + 'receiverUserId': json['receiver_user_id'], + 'tipTxSignature': json['tip_tx_signature'], + }; +} + +export function SendTipNotificationActionDataToJSON(value?: SendTipNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'amount': value.amount, + 'sender_user_id': value.senderUserId, + 'receiver_user_id': value.receiverUserId, + 'tip_tx_signature': value.tipTxSignature, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/StemFull.ts b/packages/sdk/src/sdk/api/generated/default/models/StemFull.ts new file mode 100644 index 00000000000..c3a1d79e73a --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/StemFull.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 StemFull + */ +export interface StemFull { + /** + * + * @type {string} + * @memberof StemFull + */ + id: string; + /** + * + * @type {string} + * @memberof StemFull + */ + parentId: string; + /** + * + * @type {string} + * @memberof StemFull + */ + category: string; + /** + * + * @type {string} + * @memberof StemFull + */ + cid: string; + /** + * + * @type {string} + * @memberof StemFull + */ + userId: string; + /** + * + * @type {number} + * @memberof StemFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof StemFull + */ + origFilename: string; +} + +/** + * Check if a given object implements the StemFull interface. + */ +export function instanceOfStemFull(value: object): value is StemFull { + let isInstance = true; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "parentId" in value && value["parentId"] !== undefined; + isInstance = isInstance && "category" in value && value["category"] !== undefined; + isInstance = isInstance && "cid" in value && value["cid"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "origFilename" in value && value["origFilename"] !== undefined; + + return isInstance; +} + +export function StemFullFromJSON(json: any): StemFull { + return StemFullFromJSONTyped(json, false); +} + +export function StemFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): StemFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'parentId': json['parent_id'], + 'category': json['category'], + 'cid': json['cid'], + 'userId': json['user_id'], + 'blocknumber': json['blocknumber'], + 'origFilename': json['orig_filename'], + }; +} + +export function StemFullToJSON(value?: StemFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'parent_id': value.parentId, + 'category': value.category, + 'cid': value.cid, + 'user_id': value.userId, + 'blocknumber': value.blocknumber, + 'orig_filename': value.origFilename, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts b/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts new file mode 100644 index 00000000000..826d89b6b26 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/StemParent.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface StemParent + */ +export interface StemParent { + /** + * + * @type {string} + * @memberof StemParent + */ + category: string; + /** + * + * @type {number} + * @memberof StemParent + */ + parentTrackId: number; +} + +/** + * Check if a given object implements the StemParent interface. + */ +export function instanceOfStemParent(value: object): value is StemParent { + let isInstance = true; + isInstance = isInstance && "category" in value && value["category"] !== undefined; + isInstance = isInstance && "parentTrackId" in value && value["parentTrackId"] !== undefined; + + return isInstance; +} + +export function StemParentFromJSON(json: any): StemParent { + return StemParentFromJSONTyped(json, false); +} + +export function StemParentFromJSONTyped(json: any, ignoreDiscriminator: boolean): StemParent { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'category': json['category'], + 'parentTrackId': json['parent_track_id'], + }; +} + +export function StemParentToJSON(value?: StemParent | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'category': value.category, + 'parent_track_id': value.parentTrackId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/TopUsersResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponseFull.ts new file mode 100644 index 00000000000..b83c5b9f2c3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TopUsersResponseFull.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, +} from './User'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TopUsersResponseFull + */ +export interface TopUsersResponseFull { + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TopUsersResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TopUsersResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof TopUsersResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TopUsersResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TopUsersResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the TopUsersResponseFull interface. + */ +export function instanceOfTopUsersResponseFull(value: object): value is TopUsersResponseFull { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function TopUsersResponseFullFromJSON(json: any): TopUsersResponseFull { + return TopUsersResponseFullFromJSONTyped(json, false); +} + +export function TopUsersResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopUsersResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(UserFromJSON)), + }; +} + +export function TopUsersResponseFullToJSON(value?: TopUsersResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(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 b31f12889aa..cdaf5bdc4aa 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/Track.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/Track.ts @@ -14,24 +14,78 @@ */ import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; import type { AlbumBacklink } from './AlbumBacklink'; import { AlbumBacklinkFromJSON, AlbumBacklinkFromJSONTyped, AlbumBacklinkToJSON, } from './AlbumBacklink'; +import type { CoverArt } from './CoverArt'; +import { + CoverArtFromJSON, + CoverArtFromJSONTyped, + CoverArtToJSON, +} from './CoverArt'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; import type { 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, @@ -111,18 +165,12 @@ export interface Track { * @memberof Track */ releaseDate?: string; - /** - * - * @type {string} - * @memberof Track - */ - isrc?: string; /** * * @type {RemixParent} * @memberof Track */ - remixOf?: RemixParent; + remixOf: RemixParent; /** * * @type {number} @@ -213,6 +261,324 @@ export interface Track { * @memberof Track */ albumBacklink?: AlbumBacklink; + /** + * Describes what access the given user has + * @type {Access} + * @memberof Track + */ + access: Access; + /** + * The blocknumber this track was last updated + * @type {number} + * @memberof Track + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof Track + */ + createDate?: string; + /** + * + * @type {string} + * @memberof Track + */ + coverArtSizes: string; + /** + * + * @type {CoverArt} + * @memberof Track + */ + coverArtCids?: CoverArt; + /** + * + * @type {string} + * @memberof Track + */ + createdAt: string; + /** + * + * @type {string} + * @memberof Track + */ + creditsSplits?: string; + /** + * + * @type {string} + * @memberof Track + */ + isrc?: string; + /** + * + * @type {string} + * @memberof Track + */ + license?: string; + /** + * + * @type {string} + * @memberof Track + */ + iswc?: string; + /** + * + * @type {FieldVisibility} + * @memberof Track + */ + fieldVisibility: FieldVisibility; + /** + * + * @type {Array} + * @memberof Track + */ + followeeReposts: Array; + /** + * + * @type {boolean} + * @memberof Track + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof Track + */ + isScheduledRelease: boolean; + /** + * + * @type {boolean} + * @memberof Track + */ + isUnlisted: boolean; + /** + * + * @type {boolean} + * @memberof Track + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {Array} + * @memberof Track + */ + followeeFavorites: Array; + /** + * + * @type {string} + * @memberof Track + */ + routeId: string; + /** + * + * @type {StemParent} + * @memberof Track + */ + stemOf?: StemParent; + /** + * + * @type {Array} + * @memberof Track + */ + trackSegments: Array; + /** + * + * @type {string} + * @memberof Track + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof Track + */ + userId: string; + /** + * + * @type {boolean} + * @memberof Track + */ + isDelete: boolean; + /** + * + * @type {string} + * @memberof Track + */ + coverArt?: string; + /** + * + * @type {boolean} + * @memberof Track + */ + isAvailable: boolean; + /** + * + * @type {number} + * @memberof Track + */ + aiAttributionUserId?: number; + /** + * + * @type {Array} + * @memberof Track + */ + allowedApiKeys?: Array; + /** + * + * @type {string} + * @memberof Track + */ + audioUploadId?: string; + /** + * + * @type {number} + * @memberof Track + */ + previewStartSeconds?: number; + /** + * + * @type {number} + * @memberof Track + */ + bpm?: number; + /** + * + * @type {boolean} + * @memberof Track + */ + isCustomBpm?: boolean; + /** + * + * @type {string} + * @memberof Track + */ + musicalKey?: string; + /** + * + * @type {boolean} + * @memberof Track + */ + isCustomMusicalKey?: boolean; + /** + * + * @type {number} + * @memberof Track + */ + audioAnalysisErrorCount?: number; + /** + * + * @type {boolean} + * @memberof Track + */ + commentsDisabled?: boolean; + /** + * + * @type {object} + * @memberof Track + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof Track + */ + artists?: Array; + /** + * + * @type {Array} + * @memberof Track + */ + resourceContributors?: Array; + /** + * + * @type {Array} + * @memberof Track + */ + indirectResourceContributors?: Array; + /** + * + * @type {object} + * @memberof Track + */ + rightsController?: object; + /** + * + * @type {object} + * @memberof Track + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof Track + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof Track + */ + parentalWarningType?: string; + /** + * Whether or not the owner has restricted streaming behind an access gate + * @type {boolean} + * @memberof Track + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof Track + */ + streamConditions?: AccessGate; + /** + * Whether or not the owner has restricted downloading behind an access gate + * @type {boolean} + * @memberof Track + */ + isDownloadGated: boolean; + /** + * How to unlock the track download + * @type {AccessGate} + * @memberof Track + */ + downloadConditions?: AccessGate; + /** + * + * @type {string} + * @memberof Track + */ + coverOriginalSongTitle?: string; + /** + * + * @type {string} + * @memberof Track + */ + coverOriginalArtist?: string; + /** + * Indicates whether the track is owned by the user for MRI sake + * @type {boolean} + * @memberof Track + */ + isOwnedByUser: boolean; + /** + * + * @type {UrlWithMirrors} + * @memberof Track + */ + stream: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof Track + */ + download: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof Track + */ + preview: UrlWithMirrors; } /** @@ -224,6 +590,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; @@ -233,6 +600,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; } @@ -258,8 +648,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 : 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'], @@ -275,6 +664,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': AccessFromJSON(json['access']), + 'blocknumber': json['blocknumber'], + 'createDate': !exists(json, 'create_date') ? undefined : json['create_date'], + 'coverArtSizes': json['cover_art_sizes'], + 'coverArtCids': !exists(json, 'cover_art_cids') ? undefined : CoverArtFromJSON(json['cover_art_cids']), + 'createdAt': json['created_at'], + 'creditsSplits': !exists(json, 'credits_splits') ? undefined : json['credits_splits'], + 'isrc': !exists(json, 'isrc') ? undefined : json['isrc'], + 'license': !exists(json, 'license') ? undefined : json['license'], + 'iswc': !exists(json, 'iswc') ? undefined : json['iswc'], + 'fieldVisibility': FieldVisibilityFromJSON(json['field_visibility']), + 'followeeReposts': ((json['followee_reposts'] as Array).map(RepostFromJSON)), + 'hasCurrentUserReposted': json['has_current_user_reposted'], + 'isScheduledRelease': json['is_scheduled_release'], + 'isUnlisted': json['is_unlisted'], + 'hasCurrentUserSaved': json['has_current_user_saved'], + 'followeeFavorites': ((json['followee_favorites'] as Array).map(FavoriteFromJSON)), + 'routeId': json['route_id'], + 'stemOf': !exists(json, 'stem_of') ? undefined : StemParentFromJSON(json['stem_of']), + 'trackSegments': ((json['track_segments'] as Array).map(TrackSegmentFromJSON)), + 'updatedAt': json['updated_at'], + 'userId': json['user_id'], + 'isDelete': json['is_delete'], + 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], + 'isAvailable': json['is_available'], + 'aiAttributionUserId': !exists(json, 'ai_attribution_user_id') ? undefined : json['ai_attribution_user_id'], + 'allowedApiKeys': !exists(json, 'allowed_api_keys') ? undefined : json['allowed_api_keys'], + 'audioUploadId': !exists(json, 'audio_upload_id') ? undefined : json['audio_upload_id'], + 'previewStartSeconds': !exists(json, 'preview_start_seconds') ? undefined : json['preview_start_seconds'], + 'bpm': !exists(json, 'bpm') ? undefined : json['bpm'], + 'isCustomBpm': !exists(json, 'is_custom_bpm') ? undefined : json['is_custom_bpm'], + 'musicalKey': !exists(json, 'musical_key') ? undefined : json['musical_key'], + 'isCustomMusicalKey': !exists(json, 'is_custom_musical_key') ? undefined : json['is_custom_musical_key'], + 'audioAnalysisErrorCount': !exists(json, 'audio_analysis_error_count') ? undefined : json['audio_analysis_error_count'], + 'commentsDisabled': !exists(json, 'comments_disabled') ? undefined : json['comments_disabled'], + 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], + 'artists': !exists(json, 'artists') ? undefined : json['artists'], + 'resourceContributors': !exists(json, 'resource_contributors') ? undefined : json['resource_contributors'], + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : json['indirect_resource_contributors'], + 'rightsController': !exists(json, 'rights_controller') ? undefined : json['rights_controller'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isDownloadGated': json['is_download_gated'], + 'downloadConditions': !exists(json, 'download_conditions') ? undefined : AccessGateFromJSON(json['download_conditions']), + 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], + 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], + 'isOwnedByUser': json['is_owned_by_user'], + 'stream': UrlWithMirrorsFromJSON(json['stream']), + 'download': UrlWithMirrorsFromJSON(json['download']), + 'preview': UrlWithMirrorsFromJSON(json['preview']), }; } @@ -298,7 +740,6 @@ export function TrackToJSON(value?: Track | null): any { 'is_original_available': value.isOriginalAvailable, 'mood': value.mood, 'release_date': value.releaseDate, - 'isrc': value.isrc, 'remix_of': RemixParentToJSON(value.remixOf), 'repost_count': value.repostCount, 'favorite_count': value.favoriteCount, @@ -315,6 +756,59 @@ export function TrackToJSON(value?: Track | null): any { 'playlists_containing_track': value.playlistsContainingTrack, 'pinned_comment_id': value.pinnedCommentId, 'album_backlink': AlbumBacklinkToJSON(value.albumBacklink), + 'access': AccessToJSON(value.access), + 'blocknumber': value.blocknumber, + 'create_date': value.createDate, + 'cover_art_sizes': value.coverArtSizes, + 'cover_art_cids': CoverArtToJSON(value.coverArtCids), + 'created_at': value.createdAt, + 'credits_splits': value.creditsSplits, + 'isrc': value.isrc, + 'license': value.license, + 'iswc': value.iswc, + 'field_visibility': FieldVisibilityToJSON(value.fieldVisibility), + 'followee_reposts': ((value.followeeReposts as Array).map(RepostToJSON)), + 'has_current_user_reposted': value.hasCurrentUserReposted, + 'is_scheduled_release': value.isScheduledRelease, + 'is_unlisted': value.isUnlisted, + 'has_current_user_saved': value.hasCurrentUserSaved, + 'followee_favorites': ((value.followeeFavorites as Array).map(FavoriteToJSON)), + 'route_id': value.routeId, + 'stem_of': StemParentToJSON(value.stemOf), + 'track_segments': ((value.trackSegments as Array).map(TrackSegmentToJSON)), + 'updated_at': value.updatedAt, + 'user_id': value.userId, + 'is_delete': value.isDelete, + 'cover_art': value.coverArt, + 'is_available': value.isAvailable, + 'ai_attribution_user_id': value.aiAttributionUserId, + 'allowed_api_keys': value.allowedApiKeys, + 'audio_upload_id': value.audioUploadId, + 'preview_start_seconds': value.previewStartSeconds, + 'bpm': value.bpm, + 'is_custom_bpm': value.isCustomBpm, + 'musical_key': value.musicalKey, + 'is_custom_musical_key': value.isCustomMusicalKey, + 'audio_analysis_error_count': value.audioAnalysisErrorCount, + 'comments_disabled': value.commentsDisabled, + 'ddex_release_ids': value.ddexReleaseIds, + 'artists': value.artists, + 'resource_contributors': value.resourceContributors, + 'indirect_resource_contributors': value.indirectResourceContributors, + 'rights_controller': value.rightsController, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_download_gated': value.isDownloadGated, + 'download_conditions': AccessGateToJSON(value.downloadConditions), + 'cover_original_song_title': value.coverOriginalSongTitle, + 'cover_original_artist': value.coverOriginalArtist, + 'is_owned_by_user': value.isOwnedByUser, + 'stream': UrlWithMirrorsToJSON(value.stream), + 'download': UrlWithMirrorsToJSON(value.download), + 'preview': UrlWithMirrorsToJSON(value.preview), }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackActivityFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackActivityFull.ts new file mode 100644 index 00000000000..21f705a712e --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackActivityFull.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Activity } from './Activity'; +import { + ActivityFromJSON, + ActivityFromJSONTyped, + ActivityToJSON, +} from './Activity'; +import type { Track } from './Track'; +import { + TrackFromJSON, + TrackFromJSONTyped, + TrackToJSON, +} from './Track'; + +/** + * + * @export + * @interface TrackActivityFull + */ +export interface TrackActivityFull extends Activity { + /** + * + * @type {string} + * @memberof TrackActivityFull + */ + itemType: TrackActivityFullItemTypeEnum; + /** + * + * @type {Track} + * @memberof TrackActivityFull + */ + item: Track; +} + + +/** + * @export + */ +export const TrackActivityFullItemTypeEnum = { + Track: 'track' +} as const; +export type TrackActivityFullItemTypeEnum = typeof TrackActivityFullItemTypeEnum[keyof typeof TrackActivityFullItemTypeEnum]; + + +/** + * Check if a given object implements the TrackActivityFull interface. + */ +export function instanceOfTrackActivityFull(value: object): value is TrackActivityFull { + let isInstance = true; + isInstance = isInstance && "itemType" in value && value["itemType"] !== undefined; + isInstance = isInstance && "item" in value && value["item"] !== undefined; + + return isInstance; +} + +export function TrackActivityFullFromJSON(json: any): TrackActivityFull { + return TrackActivityFullFromJSONTyped(json, false); +} + +export function TrackActivityFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackActivityFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + ...ActivityFromJSONTyped(json, ignoreDiscriminator), + 'itemType': json['item_type'], + 'item': TrackFromJSON(json['item']), + }; +} + +export function TrackActivityFullToJSON(value?: TrackActivityFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + ...ActivityToJSON(value), + 'item_type': value.itemType, + 'item': TrackToJSON(value.item), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotification.ts new file mode 100644 index 00000000000..4daa5983d76 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPlaylistNotificationAction } from './TrackAddedToPlaylistNotificationAction'; +import { + TrackAddedToPlaylistNotificationActionFromJSON, + TrackAddedToPlaylistNotificationActionFromJSONTyped, + TrackAddedToPlaylistNotificationActionToJSON, +} from './TrackAddedToPlaylistNotificationAction'; + +/** + * + * @export + * @interface TrackAddedToPlaylistNotification + */ +export interface TrackAddedToPlaylistNotification { + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TrackAddedToPlaylistNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TrackAddedToPlaylistNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TrackAddedToPlaylistNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TrackAddedToPlaylistNotification interface. + */ +export function instanceOfTrackAddedToPlaylistNotification(value: object): value is TrackAddedToPlaylistNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPlaylistNotificationFromJSON(json: any): TrackAddedToPlaylistNotification { + return TrackAddedToPlaylistNotificationFromJSONTyped(json, false); +} + +export function TrackAddedToPlaylistNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPlaylistNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TrackAddedToPlaylistNotificationActionFromJSON)), + }; +} + +export function TrackAddedToPlaylistNotificationToJSON(value?: TrackAddedToPlaylistNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TrackAddedToPlaylistNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationAction.ts new file mode 100644 index 00000000000..95f0315a279 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPlaylistNotificationActionData } from './TrackAddedToPlaylistNotificationActionData'; +import { + TrackAddedToPlaylistNotificationActionDataFromJSON, + TrackAddedToPlaylistNotificationActionDataFromJSONTyped, + TrackAddedToPlaylistNotificationActionDataToJSON, +} from './TrackAddedToPlaylistNotificationActionData'; + +/** + * + * @export + * @interface TrackAddedToPlaylistNotificationAction + */ +export interface TrackAddedToPlaylistNotificationAction { + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TrackAddedToPlaylistNotificationAction + */ + timestamp: number; + /** + * + * @type {TrackAddedToPlaylistNotificationActionData} + * @memberof TrackAddedToPlaylistNotificationAction + */ + data: TrackAddedToPlaylistNotificationActionData; +} + +/** + * Check if a given object implements the TrackAddedToPlaylistNotificationAction interface. + */ +export function instanceOfTrackAddedToPlaylistNotificationAction(value: object): value is TrackAddedToPlaylistNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPlaylistNotificationActionFromJSON(json: any): TrackAddedToPlaylistNotificationAction { + return TrackAddedToPlaylistNotificationActionFromJSONTyped(json, false); +} + +export function TrackAddedToPlaylistNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPlaylistNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TrackAddedToPlaylistNotificationActionDataFromJSON(json['data']), + }; +} + +export function TrackAddedToPlaylistNotificationActionToJSON(value?: TrackAddedToPlaylistNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TrackAddedToPlaylistNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationActionData.ts new file mode 100644 index 00000000000..3921ca28a86 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPlaylistNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackAddedToPlaylistNotificationActionData + */ +export interface TrackAddedToPlaylistNotificationActionData { + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationActionData + */ + trackId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationActionData + */ + playlistId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPlaylistNotificationActionData + */ + playlistOwnerId: string; +} + +/** + * Check if a given object implements the TrackAddedToPlaylistNotificationActionData interface. + */ +export function instanceOfTrackAddedToPlaylistNotificationActionData(value: object): value is TrackAddedToPlaylistNotificationActionData { + let isInstance = true; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + isInstance = isInstance && "playlistOwnerId" in value && value["playlistOwnerId"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPlaylistNotificationActionDataFromJSON(json: any): TrackAddedToPlaylistNotificationActionData { + return TrackAddedToPlaylistNotificationActionDataFromJSONTyped(json, false); +} + +export function TrackAddedToPlaylistNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPlaylistNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': json['track_id'], + 'playlistId': json['playlist_id'], + 'playlistOwnerId': json['playlist_owner_id'], + }; +} + +export function TrackAddedToPlaylistNotificationActionDataToJSON(value?: TrackAddedToPlaylistNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + 'playlist_id': value.playlistId, + 'playlist_owner_id': value.playlistOwnerId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotification.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotification.ts new file mode 100644 index 00000000000..23c4c2feaf8 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotification.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPurchasedAlbumNotificationAction } from './TrackAddedToPurchasedAlbumNotificationAction'; +import { + TrackAddedToPurchasedAlbumNotificationActionFromJSON, + TrackAddedToPurchasedAlbumNotificationActionFromJSONTyped, + TrackAddedToPurchasedAlbumNotificationActionToJSON, +} from './TrackAddedToPurchasedAlbumNotificationAction'; + +/** + * + * @export + * @interface TrackAddedToPurchasedAlbumNotification + */ +export interface TrackAddedToPurchasedAlbumNotification { + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + type: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + groupId: string; + /** + * + * @type {boolean} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + isSeen: boolean; + /** + * + * @type {number} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + seenAt?: number; + /** + * + * @type {Array} + * @memberof TrackAddedToPurchasedAlbumNotification + */ + actions: Array; +} + +/** + * Check if a given object implements the TrackAddedToPurchasedAlbumNotification interface. + */ +export function instanceOfTrackAddedToPurchasedAlbumNotification(value: object): value is TrackAddedToPurchasedAlbumNotification { + let isInstance = true; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; + isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; + isInstance = isInstance && "actions" in value && value["actions"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPurchasedAlbumNotificationFromJSON(json: any): TrackAddedToPurchasedAlbumNotification { + return TrackAddedToPurchasedAlbumNotificationFromJSONTyped(json, false); +} + +export function TrackAddedToPurchasedAlbumNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPurchasedAlbumNotification { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'groupId': json['group_id'], + 'isSeen': json['is_seen'], + 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], + 'actions': ((json['actions'] as Array).map(TrackAddedToPurchasedAlbumNotificationActionFromJSON)), + }; +} + +export function TrackAddedToPurchasedAlbumNotificationToJSON(value?: TrackAddedToPurchasedAlbumNotification | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'group_id': value.groupId, + 'is_seen': value.isSeen, + 'seen_at': value.seenAt, + 'actions': ((value.actions as Array).map(TrackAddedToPurchasedAlbumNotificationActionToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationAction.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationAction.ts new file mode 100644 index 00000000000..3af07143b09 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationAction.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackAddedToPurchasedAlbumNotificationActionData } from './TrackAddedToPurchasedAlbumNotificationActionData'; +import { + TrackAddedToPurchasedAlbumNotificationActionDataFromJSON, + TrackAddedToPurchasedAlbumNotificationActionDataFromJSONTyped, + TrackAddedToPurchasedAlbumNotificationActionDataToJSON, +} from './TrackAddedToPurchasedAlbumNotificationActionData'; + +/** + * + * @export + * @interface TrackAddedToPurchasedAlbumNotificationAction + */ +export interface TrackAddedToPurchasedAlbumNotificationAction { + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + specifier: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + type: string; + /** + * + * @type {number} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + timestamp: number; + /** + * + * @type {TrackAddedToPurchasedAlbumNotificationActionData} + * @memberof TrackAddedToPurchasedAlbumNotificationAction + */ + data: TrackAddedToPurchasedAlbumNotificationActionData; +} + +/** + * Check if a given object implements the TrackAddedToPurchasedAlbumNotificationAction interface. + */ +export function instanceOfTrackAddedToPurchasedAlbumNotificationAction(value: object): value is TrackAddedToPurchasedAlbumNotificationAction { + let isInstance = true; + isInstance = isInstance && "specifier" in value && value["specifier"] !== undefined; + isInstance = isInstance && "type" in value && value["type"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPurchasedAlbumNotificationActionFromJSON(json: any): TrackAddedToPurchasedAlbumNotificationAction { + return TrackAddedToPurchasedAlbumNotificationActionFromJSONTyped(json, false); +} + +export function TrackAddedToPurchasedAlbumNotificationActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPurchasedAlbumNotificationAction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'specifier': json['specifier'], + 'type': json['type'], + 'timestamp': json['timestamp'], + 'data': TrackAddedToPurchasedAlbumNotificationActionDataFromJSON(json['data']), + }; +} + +export function TrackAddedToPurchasedAlbumNotificationActionToJSON(value?: TrackAddedToPurchasedAlbumNotificationAction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'specifier': value.specifier, + 'type': value.type, + 'timestamp': value.timestamp, + 'data': TrackAddedToPurchasedAlbumNotificationActionDataToJSON(value.data), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationActionData.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationActionData.ts new file mode 100644 index 00000000000..7e924c5c409 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackAddedToPurchasedAlbumNotificationActionData.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackAddedToPurchasedAlbumNotificationActionData + */ +export interface TrackAddedToPurchasedAlbumNotificationActionData { + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationActionData + */ + trackId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationActionData + */ + playlistId: string; + /** + * + * @type {string} + * @memberof TrackAddedToPurchasedAlbumNotificationActionData + */ + playlistOwnerId: string; +} + +/** + * Check if a given object implements the TrackAddedToPurchasedAlbumNotificationActionData interface. + */ +export function instanceOfTrackAddedToPurchasedAlbumNotificationActionData(value: object): value is TrackAddedToPurchasedAlbumNotificationActionData { + let isInstance = true; + isInstance = isInstance && "trackId" in value && value["trackId"] !== undefined; + isInstance = isInstance && "playlistId" in value && value["playlistId"] !== undefined; + isInstance = isInstance && "playlistOwnerId" in value && value["playlistOwnerId"] !== undefined; + + return isInstance; +} + +export function TrackAddedToPurchasedAlbumNotificationActionDataFromJSON(json: any): TrackAddedToPurchasedAlbumNotificationActionData { + return TrackAddedToPurchasedAlbumNotificationActionDataFromJSONTyped(json, false); +} + +export function TrackAddedToPurchasedAlbumNotificationActionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackAddedToPurchasedAlbumNotificationActionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'trackId': json['track_id'], + 'playlistId': json['playlist_id'], + 'playlistOwnerId': json['playlist_owner_id'], + }; +} + +export function TrackAddedToPurchasedAlbumNotificationActionDataToJSON(value?: TrackAddedToPurchasedAlbumNotificationActionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'track_id': value.trackId, + 'playlist_id': value.playlistId, + 'playlist_owner_id': value.playlistOwnerId, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/TrackArtworkFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackArtworkFull.ts new file mode 100644 index 00000000000..f49737e8317 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackArtworkFull.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TrackArtworkFull + */ +export interface TrackArtworkFull { + /** + * + * @type {string} + * @memberof TrackArtworkFull + */ + _150x150?: string; + /** + * + * @type {string} + * @memberof TrackArtworkFull + */ + _480x480?: string; + /** + * + * @type {string} + * @memberof TrackArtworkFull + */ + _1000x1000?: string; + /** + * + * @type {Array} + * @memberof TrackArtworkFull + */ + mirrors?: Array; +} + +/** + * Check if a given object implements the TrackArtworkFull interface. + */ +export function instanceOfTrackArtworkFull(value: object): value is TrackArtworkFull { + let isInstance = true; + + return isInstance; +} + +export function TrackArtworkFullFromJSON(json: any): TrackArtworkFull { + return TrackArtworkFullFromJSONTyped(json, false); +} + +export function TrackArtworkFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackArtworkFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_150x150': !exists(json, '150x150') ? undefined : json['150x150'], + '_480x480': !exists(json, '480x480') ? undefined : json['480x480'], + '_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'], + 'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'], + }; +} + +export function TrackArtworkFullToJSON(value?: TrackArtworkFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + '150x150': value._150x150, + '480x480': value._480x480, + '1000x1000': value._1000x1000, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/TrackFavoritesResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackFavoritesResponse.ts new file mode 100644 index 00000000000..7bc688fbb1d --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackFavoritesResponse.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 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} + * @memberof TrackFavoritesResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the TrackFavoritesResponse interface. + */ +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; +} + +export function TrackFavoritesResponseFromJSON(json: any): TrackFavoritesResponse { + return TrackFavoritesResponseFromJSONTyped(json, false); +} + +export function TrackFavoritesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackFavoritesResponse { + 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 TrackFavoritesResponseToJSON(value?: TrackFavoritesResponse | 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/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/TrackFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackFull.ts new file mode 100644 index 00000000000..d978c6456cf --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackFull.ts @@ -0,0 +1,814 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Access } from './Access'; +import { + AccessFromJSON, + AccessFromJSONTyped, + AccessToJSON, +} from './Access'; +import type { AccessGate } from './AccessGate'; +import { + AccessGateFromJSON, + AccessGateFromJSONTyped, + AccessGateToJSON, +} from './AccessGate'; +import type { AlbumBacklink } from './AlbumBacklink'; +import { + AlbumBacklinkFromJSON, + AlbumBacklinkFromJSONTyped, + AlbumBacklinkToJSON, +} from './AlbumBacklink'; +import type { CoverArt } from './CoverArt'; +import { + CoverArtFromJSON, + CoverArtFromJSONTyped, + CoverArtToJSON, +} from './CoverArt'; +import type { Favorite } from './Favorite'; +import { + FavoriteFromJSON, + FavoriteFromJSONTyped, + FavoriteToJSON, +} from './Favorite'; +import type { FieldVisibility } from './FieldVisibility'; +import { + FieldVisibilityFromJSON, + FieldVisibilityFromJSONTyped, + FieldVisibilityToJSON, +} from './FieldVisibility'; +import type { 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 TrackFull + */ +export interface TrackFull { + /** + * + * @type {TrackArtwork} + * @memberof TrackFull + */ + artwork: TrackArtwork; + /** + * + * @type {string} + * @memberof TrackFull + */ + description?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + genre: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + id: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + trackCid?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + previewCid?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + origFileCid?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + origFilename?: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isOriginalAvailable: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + mood?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + releaseDate?: string; + /** + * + * @type {RemixParent} + * @memberof TrackFull + */ + remixOf: RemixParent; + /** + * + * @type {number} + * @memberof TrackFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof TrackFull + */ + favoriteCount: number; + /** + * + * @type {number} + * @memberof TrackFull + */ + commentCount: number; + /** + * + * @type {string} + * @memberof TrackFull + */ + tags?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + title: string; + /** + * + * @type {User} + * @memberof TrackFull + */ + user: User; + /** + * + * @type {number} + * @memberof TrackFull + */ + duration: number; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isDownloadable: boolean; + /** + * + * @type {number} + * @memberof TrackFull + */ + playCount: number; + /** + * + * @type {string} + * @memberof TrackFull + */ + permalink: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isStreamable?: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + ddexApp?: string; + /** + * + * @type {Array} + * @memberof TrackFull + */ + playlistsContainingTrack?: Array; + /** + * + * @type {number} + * @memberof TrackFull + */ + pinnedCommentId?: number; + /** + * + * @type {AlbumBacklink} + * @memberof TrackFull + */ + albumBacklink?: AlbumBacklink; + /** + * Describes what access the given user has + * @type {Access} + * @memberof TrackFull + */ + access: Access; + /** + * The blocknumber this track was last updated + * @type {number} + * @memberof TrackFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof TrackFull + */ + createDate?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverArtSizes: string; + /** + * + * @type {CoverArt} + * @memberof TrackFull + */ + coverArtCids?: CoverArt; + /** + * + * @type {string} + * @memberof TrackFull + */ + createdAt: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + creditsSplits?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + isrc?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + license?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + iswc?: string; + /** + * + * @type {FieldVisibility} + * @memberof TrackFull + */ + fieldVisibility: FieldVisibility; + /** + * + * @type {Array} + * @memberof TrackFull + */ + followeeReposts: Array; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + hasCurrentUserReposted: boolean; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isScheduledRelease: boolean; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isUnlisted: boolean; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + hasCurrentUserSaved: boolean; + /** + * + * @type {Array} + * @memberof TrackFull + */ + followeeFavorites: Array; + /** + * + * @type {string} + * @memberof TrackFull + */ + routeId: string; + /** + * + * @type {StemParent} + * @memberof TrackFull + */ + stemOf?: StemParent; + /** + * + * @type {Array} + * @memberof TrackFull + */ + trackSegments: Array; + /** + * + * @type {string} + * @memberof TrackFull + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + userId: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isDelete: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverArt?: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isAvailable: boolean; + /** + * + * @type {number} + * @memberof TrackFull + */ + aiAttributionUserId?: number; + /** + * + * @type {Array} + * @memberof TrackFull + */ + allowedApiKeys?: Array; + /** + * + * @type {string} + * @memberof TrackFull + */ + audioUploadId?: string; + /** + * + * @type {number} + * @memberof TrackFull + */ + previewStartSeconds?: number; + /** + * + * @type {number} + * @memberof TrackFull + */ + bpm?: number; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isCustomBpm?: boolean; + /** + * + * @type {string} + * @memberof TrackFull + */ + musicalKey?: string; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + isCustomMusicalKey?: boolean; + /** + * + * @type {number} + * @memberof TrackFull + */ + audioAnalysisErrorCount?: number; + /** + * + * @type {boolean} + * @memberof TrackFull + */ + commentsDisabled?: boolean; + /** + * + * @type {object} + * @memberof TrackFull + */ + ddexReleaseIds?: object; + /** + * + * @type {Array} + * @memberof TrackFull + */ + artists?: Array; + /** + * + * @type {Array} + * @memberof TrackFull + */ + resourceContributors?: Array; + /** + * + * @type {Array} + * @memberof TrackFull + */ + indirectResourceContributors?: Array; + /** + * + * @type {object} + * @memberof TrackFull + */ + rightsController?: object; + /** + * + * @type {object} + * @memberof TrackFull + */ + copyrightLine?: object; + /** + * + * @type {object} + * @memberof TrackFull + */ + producerCopyrightLine?: object; + /** + * + * @type {string} + * @memberof TrackFull + */ + parentalWarningType?: string; + /** + * Whether or not the owner has restricted streaming behind an access gate + * @type {boolean} + * @memberof TrackFull + */ + isStreamGated: boolean; + /** + * How to unlock stream access to the track + * @type {AccessGate} + * @memberof TrackFull + */ + streamConditions?: AccessGate; + /** + * Whether or not the owner has restricted downloading behind an access gate + * @type {boolean} + * @memberof TrackFull + */ + isDownloadGated: boolean; + /** + * How to unlock the track download + * @type {AccessGate} + * @memberof TrackFull + */ + downloadConditions?: AccessGate; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverOriginalSongTitle?: string; + /** + * + * @type {string} + * @memberof TrackFull + */ + coverOriginalArtist?: string; + /** + * Indicates whether the track is owned by the user for MRI sake + * @type {boolean} + * @memberof TrackFull + */ + isOwnedByUser: boolean; + /** + * + * @type {UrlWithMirrors} + * @memberof TrackFull + */ + stream: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof TrackFull + */ + download: UrlWithMirrors; + /** + * + * @type {UrlWithMirrors} + * @memberof TrackFull + */ + preview: UrlWithMirrors; +} + +/** + * Check if a given object implements the TrackFull interface. + */ +export function instanceOfTrackFull(value: object): value is TrackFull { + let isInstance = true; + isInstance = isInstance && "artwork" in value && value["artwork"] !== undefined; + isInstance = isInstance && "genre" in value && value["genre"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isOriginalAvailable" in value && value["isOriginalAvailable"] !== undefined; + isInstance = isInstance && "remixOf" in value && value["remixOf"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "favoriteCount" in value && value["favoriteCount"] !== undefined; + isInstance = isInstance && "commentCount" in value && value["commentCount"] !== undefined; + isInstance = isInstance && "title" in value && value["title"] !== undefined; + isInstance = isInstance && "user" in value && value["user"] !== undefined; + isInstance = isInstance && "duration" in value && value["duration"] !== undefined; + isInstance = isInstance && "isDownloadable" in value && value["isDownloadable"] !== undefined; + isInstance = isInstance && "playCount" in value && value["playCount"] !== undefined; + isInstance = isInstance && "permalink" in value && value["permalink"] !== undefined; + isInstance = isInstance && "access" in value && value["access"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "coverArtSizes" in value && value["coverArtSizes"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "fieldVisibility" in value && value["fieldVisibility"] !== undefined; + isInstance = isInstance && "followeeReposts" in value && value["followeeReposts"] !== undefined; + isInstance = isInstance && "hasCurrentUserReposted" in value && value["hasCurrentUserReposted"] !== undefined; + isInstance = isInstance && "isScheduledRelease" in value && value["isScheduledRelease"] !== undefined; + isInstance = isInstance && "isUnlisted" in value && value["isUnlisted"] !== undefined; + isInstance = isInstance && "hasCurrentUserSaved" in value && value["hasCurrentUserSaved"] !== undefined; + isInstance = isInstance && "followeeFavorites" in value && value["followeeFavorites"] !== undefined; + isInstance = isInstance && "routeId" in value && value["routeId"] !== undefined; + isInstance = isInstance && "trackSegments" in value && value["trackSegments"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "isDelete" in value && value["isDelete"] !== undefined; + isInstance = isInstance && "isAvailable" in value && value["isAvailable"] !== undefined; + isInstance = isInstance && "isStreamGated" in value && value["isStreamGated"] !== undefined; + isInstance = isInstance && "isDownloadGated" in value && value["isDownloadGated"] !== undefined; + isInstance = isInstance && "isOwnedByUser" in value && value["isOwnedByUser"] !== undefined; + isInstance = isInstance && "stream" in value && value["stream"] !== undefined; + isInstance = isInstance && "download" in value && value["download"] !== undefined; + isInstance = isInstance && "preview" in value && value["preview"] !== undefined; + + return isInstance; +} + +export function TrackFullFromJSON(json: any): TrackFull { + return TrackFullFromJSONTyped(json, false); +} + +export function TrackFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'artwork': 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 : 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': ((json['followee_reposts'] as Array).map(RepostFromJSON)), + 'hasCurrentUserReposted': json['has_current_user_reposted'], + 'isScheduledRelease': json['is_scheduled_release'], + 'isUnlisted': json['is_unlisted'], + 'hasCurrentUserSaved': json['has_current_user_saved'], + 'followeeFavorites': ((json['followee_favorites'] as Array).map(FavoriteFromJSON)), + 'routeId': json['route_id'], + 'stemOf': !exists(json, 'stem_of') ? undefined : StemParentFromJSON(json['stem_of']), + 'trackSegments': ((json['track_segments'] as Array).map(TrackSegmentFromJSON)), + 'updatedAt': json['updated_at'], + 'userId': json['user_id'], + 'isDelete': json['is_delete'], + 'coverArt': !exists(json, 'cover_art') ? undefined : json['cover_art'], + 'isAvailable': json['is_available'], + 'aiAttributionUserId': !exists(json, 'ai_attribution_user_id') ? undefined : json['ai_attribution_user_id'], + 'allowedApiKeys': !exists(json, 'allowed_api_keys') ? undefined : json['allowed_api_keys'], + 'audioUploadId': !exists(json, 'audio_upload_id') ? undefined : json['audio_upload_id'], + 'previewStartSeconds': !exists(json, 'preview_start_seconds') ? undefined : json['preview_start_seconds'], + 'bpm': !exists(json, 'bpm') ? undefined : json['bpm'], + 'isCustomBpm': !exists(json, 'is_custom_bpm') ? undefined : json['is_custom_bpm'], + 'musicalKey': !exists(json, 'musical_key') ? undefined : json['musical_key'], + 'isCustomMusicalKey': !exists(json, 'is_custom_musical_key') ? undefined : json['is_custom_musical_key'], + 'audioAnalysisErrorCount': !exists(json, 'audio_analysis_error_count') ? undefined : json['audio_analysis_error_count'], + 'commentsDisabled': !exists(json, 'comments_disabled') ? undefined : json['comments_disabled'], + 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], + 'artists': !exists(json, 'artists') ? undefined : json['artists'], + 'resourceContributors': !exists(json, 'resource_contributors') ? undefined : json['resource_contributors'], + 'indirectResourceContributors': !exists(json, 'indirect_resource_contributors') ? undefined : json['indirect_resource_contributors'], + 'rightsController': !exists(json, 'rights_controller') ? undefined : json['rights_controller'], + 'copyrightLine': !exists(json, 'copyright_line') ? undefined : json['copyright_line'], + 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : json['producer_copyright_line'], + 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], + 'isStreamGated': json['is_stream_gated'], + 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), + 'isDownloadGated': json['is_download_gated'], + 'downloadConditions': !exists(json, 'download_conditions') ? undefined : AccessGateFromJSON(json['download_conditions']), + 'coverOriginalSongTitle': !exists(json, 'cover_original_song_title') ? undefined : json['cover_original_song_title'], + 'coverOriginalArtist': !exists(json, 'cover_original_artist') ? undefined : json['cover_original_artist'], + 'isOwnedByUser': json['is_owned_by_user'], + 'stream': UrlWithMirrorsFromJSON(json['stream']), + 'download': UrlWithMirrorsFromJSON(json['download']), + 'preview': UrlWithMirrorsFromJSON(json['preview']), + }; +} + +export function TrackFullToJSON(value?: TrackFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'artwork': 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, + '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 as Array).map(RepostToJSON)), + 'has_current_user_reposted': value.hasCurrentUserReposted, + 'is_scheduled_release': value.isScheduledRelease, + 'is_unlisted': value.isUnlisted, + 'has_current_user_saved': value.hasCurrentUserSaved, + 'followee_favorites': ((value.followeeFavorites as Array).map(FavoriteToJSON)), + 'route_id': value.routeId, + 'stem_of': StemParentToJSON(value.stemOf), + 'track_segments': ((value.trackSegments as Array).map(TrackSegmentToJSON)), + 'updated_at': value.updatedAt, + 'user_id': value.userId, + 'is_delete': value.isDelete, + 'cover_art': value.coverArt, + 'is_available': value.isAvailable, + 'ai_attribution_user_id': value.aiAttributionUserId, + 'allowed_api_keys': value.allowedApiKeys, + 'audio_upload_id': value.audioUploadId, + 'preview_start_seconds': value.previewStartSeconds, + 'bpm': value.bpm, + 'is_custom_bpm': value.isCustomBpm, + 'musical_key': value.musicalKey, + 'is_custom_musical_key': value.isCustomMusicalKey, + 'audio_analysis_error_count': value.audioAnalysisErrorCount, + 'comments_disabled': value.commentsDisabled, + 'ddex_release_ids': value.ddexReleaseIds, + 'artists': value.artists, + 'resource_contributors': value.resourceContributors, + 'indirect_resource_contributors': value.indirectResourceContributors, + 'rights_controller': value.rightsController, + 'copyright_line': value.copyrightLine, + 'producer_copyright_line': value.producerCopyrightLine, + 'parental_warning_type': value.parentalWarningType, + 'is_stream_gated': value.isStreamGated, + 'stream_conditions': AccessGateToJSON(value.streamConditions), + 'is_download_gated': value.isDownloadGated, + 'download_conditions': AccessGateToJSON(value.downloadConditions), + 'cover_original_song_title': value.coverOriginalSongTitle, + 'cover_original_artist': value.coverOriginalArtist, + 'is_owned_by_user': value.isOwnedByUser, + 'stream': UrlWithMirrorsToJSON(value.stream), + 'download': UrlWithMirrorsToJSON(value.download), + 'preview': UrlWithMirrorsToJSON(value.preview), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/TrackId.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackId.ts new file mode 100644 index 00000000000..5556dd0cac7 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackId.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 TrackId + */ +export interface TrackId { + /** + * + * @type {string} + * @memberof TrackId + */ + id: string; +} + +/** + * Check if a given object implements the TrackId interface. + */ +export function instanceOfTrackId(value: object): value is TrackId { + let isInstance = true; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + + return isInstance; +} + +export function TrackIdFromJSON(json: any): TrackId { + return TrackIdFromJSONTyped(json, false); +} + +export function TrackIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackId { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + }; +} + +export function TrackIdToJSON(value?: TrackId | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + }; +} + 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/TrackLibraryResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponseFull.ts new file mode 100644 index 00000000000..2136b95eaaa --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackLibraryResponseFull.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TrackActivity } from './TrackActivity'; +import { + TrackActivityFromJSON, + TrackActivityFromJSONTyped, + TrackActivityToJSON, +} from './TrackActivity'; +import type { VersionMetadata } from './VersionMetadata'; +import { + VersionMetadataFromJSON, + VersionMetadataFromJSONTyped, + VersionMetadataToJSON, +} from './VersionMetadata'; + +/** + * + * @export + * @interface TrackLibraryResponseFull + */ +export interface TrackLibraryResponseFull { + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof TrackLibraryResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof TrackLibraryResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof TrackLibraryResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof TrackLibraryResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof TrackLibraryResponseFull + */ + data?: Array; +} + +/** + * Check if a given object implements the TrackLibraryResponseFull interface. + */ +export function instanceOfTrackLibraryResponseFull(value: object): value is TrackLibraryResponseFull { + let isInstance = true; + isInstance = isInstance && "latestChainBlock" in value && value["latestChainBlock"] !== undefined; + isInstance = isInstance && "latestIndexedBlock" in value && value["latestIndexedBlock"] !== undefined; + isInstance = isInstance && "latestChainSlotPlays" in value && value["latestChainSlotPlays"] !== undefined; + isInstance = isInstance && "latestIndexedSlotPlays" in value && value["latestIndexedSlotPlays"] !== undefined; + isInstance = isInstance && "signature" in value && value["signature"] !== undefined; + isInstance = isInstance && "timestamp" in value && value["timestamp"] !== undefined; + isInstance = isInstance && "version" in value && value["version"] !== undefined; + + return isInstance; +} + +export function TrackLibraryResponseFullFromJSON(json: any): TrackLibraryResponseFull { + return TrackLibraryResponseFullFromJSONTyped(json, false); +} + +export function TrackLibraryResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackLibraryResponseFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latestChainBlock': json['latest_chain_block'], + 'latestIndexedBlock': json['latest_indexed_block'], + 'latestChainSlotPlays': json['latest_chain_slot_plays'], + 'latestIndexedSlotPlays': json['latest_indexed_slot_plays'], + 'signature': json['signature'], + 'timestamp': json['timestamp'], + 'version': VersionMetadataFromJSON(json['version']), + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(TrackActivityFromJSON)), + }; +} + +export function TrackLibraryResponseFullToJSON(value?: TrackLibraryResponseFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_chain_block': value.latestChainBlock, + 'latest_indexed_block': value.latestIndexedBlock, + 'latest_chain_slot_plays': value.latestChainSlotPlays, + 'latest_indexed_slot_plays': value.latestIndexedSlotPlays, + 'signature': value.signature, + 'timestamp': value.timestamp, + 'version': VersionMetadataToJSON(value.version), + 'data': value.data === undefined ? undefined : ((value.data as Array).map(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 new file mode 100644 index 00000000000..bac4cc6e0c5 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrackRepostsResponse.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 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} + * @memberof TrackRepostsResponse + */ + data?: Array; +} + +/** + * Check if a given object implements the TrackRepostsResponse interface. + */ +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; +} + +export function TrackRepostsResponseFromJSON(json: any): TrackRepostsResponse { + return TrackRepostsResponseFromJSONTyped(json, false); +} + +export function TrackRepostsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackRepostsResponse { + 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 TrackRepostsResponseToJSON(value?: TrackRepostsResponse | 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/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 new file mode 100644 index 00000000000..d62d882fa35 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TracksCountResponse.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 TracksCountResponse + */ +export interface TracksCountResponse { + /** + * The total number of tracks matching the filter criteria + * @type {number} + * @memberof TracksCountResponse + */ + data: number; +} + +/** + * Check if a given object implements the TracksCountResponse interface. + */ +export function instanceOfTracksCountResponse(value: object): value is TracksCountResponse { + let isInstance = true; + isInstance = isInstance && "data" in value && value["data"] !== undefined; + + return isInstance; +} + +export function TracksCountResponseFromJSON(json: any): TracksCountResponse { + return TracksCountResponseFromJSONTyped(json, false); +} + +export function TracksCountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TracksCountResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': json['data'], + }; +} + +export function TracksCountResponseToJSON(value?: TracksCountResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': value.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/TrendingIdsResponse.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingIdsResponse.ts new file mode 100644 index 00000000000..6b26c0b56a3 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingIdsResponse.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 { TrendingTimesIds } from './TrendingTimesIds'; +import { + TrendingTimesIdsFromJSON, + TrendingTimesIdsFromJSONTyped, + TrendingTimesIdsToJSON, +} from './TrendingTimesIds'; + +/** + * + * @export + * @interface TrendingIdsResponse + */ +export interface TrendingIdsResponse { + /** + * + * @type {TrendingTimesIds} + * @memberof TrendingIdsResponse + */ + data?: TrendingTimesIds; +} + +/** + * Check if a given object implements the TrendingIdsResponse interface. + */ +export function instanceOfTrendingIdsResponse(value: object): value is TrendingIdsResponse { + let isInstance = true; + + return isInstance; +} + +export function TrendingIdsResponseFromJSON(json: any): TrendingIdsResponse { + return TrendingIdsResponseFromJSONTyped(json, false); +} + +export function TrendingIdsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingIdsResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': !exists(json, 'data') ? undefined : TrendingTimesIdsFromJSON(json['data']), + }; +} + +export function TrendingIdsResponseToJSON(value?: TrendingIdsResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': TrendingTimesIdsToJSON(value.data), + }; +} + 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/TrendingTimesIds.ts b/packages/sdk/src/sdk/api/generated/default/models/TrendingTimesIds.ts new file mode 100644 index 00000000000..c90a28244c1 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/TrendingTimesIds.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 { TrackId } from './TrackId'; +import { + TrackIdFromJSON, + TrackIdFromJSONTyped, + TrackIdToJSON, +} from './TrackId'; + +/** + * + * @export + * @interface TrendingTimesIds + */ +export interface TrendingTimesIds { + /** + * + * @type {Array} + * @memberof TrendingTimesIds + */ + week?: Array; + /** + * + * @type {Array} + * @memberof TrendingTimesIds + */ + month?: Array; + /** + * + * @type {Array} + * @memberof TrendingTimesIds + */ + year?: Array; +} + +/** + * Check if a given object implements the TrendingTimesIds interface. + */ +export function instanceOfTrendingTimesIds(value: object): value is TrendingTimesIds { + let isInstance = true; + + return isInstance; +} + +export function TrendingTimesIdsFromJSON(json: any): TrendingTimesIds { + return TrendingTimesIdsFromJSONTyped(json, false); +} + +export function TrendingTimesIdsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingTimesIds { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'week': !exists(json, 'week') ? undefined : ((json['week'] as Array).map(TrackIdFromJSON)), + 'month': !exists(json, 'month') ? undefined : ((json['month'] as Array).map(TrackIdFromJSON)), + 'year': !exists(json, 'year') ? undefined : ((json['year'] as Array).map(TrackIdFromJSON)), + }; +} + +export function TrendingTimesIdsToJSON(value?: TrendingTimesIds | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'week': value.week === undefined ? undefined : ((value.week as Array).map(TrackIdToJSON)), + 'month': value.month === undefined ? undefined : ((value.month as Array).map(TrackIdToJSON)), + 'year': value.year === undefined ? undefined : ((value.year as Array).map(TrackIdToJSON)), + }; +} + 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/UrlWithMirrors.ts b/packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts new file mode 100644 index 00000000000..189a2324136 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UrlWithMirrors.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UrlWithMirrors + */ +export interface UrlWithMirrors { + /** + * + * @type {string} + * @memberof UrlWithMirrors + */ + url?: string; + /** + * + * @type {Array} + * @memberof UrlWithMirrors + */ + mirrors: Array; +} + +/** + * Check if a given object implements the UrlWithMirrors interface. + */ +export function instanceOfUrlWithMirrors(value: object): value is UrlWithMirrors { + let isInstance = true; + isInstance = isInstance && "mirrors" in value && value["mirrors"] !== undefined; + + return isInstance; +} + +export function UrlWithMirrorsFromJSON(json: any): UrlWithMirrors { + return UrlWithMirrorsFromJSONTyped(json, false); +} + +export function UrlWithMirrorsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UrlWithMirrors { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'url': !exists(json, 'url') ? undefined : json['url'], + 'mirrors': json['mirrors'], + }; +} + +export function UrlWithMirrorsToJSON(value?: UrlWithMirrors | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'url': value.url, + 'mirrors': value.mirrors, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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 971e2d8be75..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} @@ -231,6 +255,156 @@ export interface User { * @memberof User */ wallet: string; + /** + * + * @type {string} + * @memberof User + */ + balance: string; + /** + * + * @type {string} + * @memberof User + */ + associatedWalletsBalance: string; + /** + * + * @type {string} + * @memberof User + */ + totalBalance: string; + /** + * + * @type {string} + * @memberof User + */ + waudioBalance: string; + /** + * + * @type {string} + * @memberof User + */ + associatedSolWalletsBalance: string; + /** + * + * @type {number} + * @memberof User + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof User + */ + createdAt: string; + /** + * + * @type {boolean} + * @memberof User + */ + isStorageV2: boolean; + /** + * + * @type {string} + * @memberof User + */ + creatorNodeEndpoint?: string; + /** + * + * @type {number} + * @memberof User + */ + currentUserFolloweeFollowCount: number; + /** + * + * @type {boolean} + * @memberof User + */ + doesCurrentUserFollow: boolean; + /** + * + * @type {boolean} + * @memberof User + */ + doesCurrentUserSubscribe: boolean; + /** + * + * @type {boolean} + * @memberof User + */ + doesFollowCurrentUser: boolean; + /** + * + * @type {string} + * @memberof User + */ + handleLc: string; + /** + * + * @type {string} + * @memberof User + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof User + */ + coverPhotoSizes?: string; + /** + * + * @type {CoverPhoto} + * @memberof User + */ + coverPhotoCids?: CoverPhoto; + /** + * + * @type {string} + * @memberof User + */ + coverPhotoLegacy?: string; + /** + * + * @type {string} + * @memberof User + */ + profilePictureSizes?: string; + /** + * + * @type {ProfilePicture} + * @memberof User + */ + profilePictureCids?: ProfilePicture; + /** + * + * @type {string} + * @memberof User + */ + profilePictureLegacy?: string; + /** + * + * @type {boolean} + * @memberof User + */ + hasCollectibles: boolean; + /** + * + * @type {PlaylistLibrary} + * @memberof User + */ + playlistLibrary?: PlaylistLibrary; + /** + * + * @type {boolean} + * @memberof User + */ + allowAiAttribution: boolean; + /** + * + * @type {string} + * @memberof User + */ + profileType?: string; } /** @@ -239,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; @@ -260,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; } @@ -276,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'], @@ -307,6 +500,31 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User 'supportingCount': json['supporting_count'], 'totalAudioBalance': json['total_audio_balance'], 'wallet': json['wallet'], + 'balance': json['balance'], + 'associatedWalletsBalance': json['associated_wallets_balance'], + 'totalBalance': json['total_balance'], + 'waudioBalance': json['waudio_balance'], + 'associatedSolWalletsBalance': json['associated_sol_wallets_balance'], + 'blocknumber': json['blocknumber'], + 'createdAt': json['created_at'], + 'isStorageV2': json['is_storage_v2'], + 'creatorNodeEndpoint': !exists(json, 'creator_node_endpoint') ? undefined : json['creator_node_endpoint'], + 'currentUserFolloweeFollowCount': json['current_user_followee_follow_count'], + 'doesCurrentUserFollow': json['does_current_user_follow'], + 'doesCurrentUserSubscribe': json['does_current_user_subscribe'], + 'doesFollowCurrentUser': json['does_follow_current_user'], + 'handleLc': json['handle_lc'], + 'updatedAt': json['updated_at'], + 'coverPhotoSizes': !exists(json, 'cover_photo_sizes') ? undefined : json['cover_photo_sizes'], + 'coverPhotoCids': !exists(json, 'cover_photo_cids') ? undefined : CoverPhotoFromJSON(json['cover_photo_cids']), + 'coverPhotoLegacy': !exists(json, 'cover_photo_legacy') ? undefined : json['cover_photo_legacy'], + 'profilePictureSizes': !exists(json, 'profile_picture_sizes') ? undefined : json['profile_picture_sizes'], + 'profilePictureCids': !exists(json, 'profile_picture_cids') ? undefined : ProfilePictureFromJSON(json['profile_picture_cids']), + 'profilePictureLegacy': !exists(json, 'profile_picture_legacy') ? undefined : json['profile_picture_legacy'], + 'hasCollectibles': json['has_collectibles'], + 'playlistLibrary': !exists(json, 'playlist_library') ? undefined : PlaylistLibraryFromJSON(json['playlist_library']), + 'allowAiAttribution': json['allow_ai_attribution'], + 'profileType': !exists(json, 'profile_type') ? undefined : json['profile_type'], }; } @@ -321,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, @@ -352,6 +572,31 @@ export function UserToJSON(value?: User | null): any { 'supporting_count': value.supportingCount, 'total_audio_balance': value.totalAudioBalance, 'wallet': value.wallet, + 'balance': value.balance, + 'associated_wallets_balance': value.associatedWalletsBalance, + 'total_balance': value.totalBalance, + 'waudio_balance': value.waudioBalance, + 'associated_sol_wallets_balance': value.associatedSolWalletsBalance, + 'blocknumber': value.blocknumber, + 'created_at': value.createdAt, + 'is_storage_v2': value.isStorageV2, + 'creator_node_endpoint': value.creatorNodeEndpoint, + 'current_user_followee_follow_count': value.currentUserFolloweeFollowCount, + 'does_current_user_follow': value.doesCurrentUserFollow, + 'does_current_user_subscribe': value.doesCurrentUserSubscribe, + 'does_follow_current_user': value.doesFollowCurrentUser, + 'handle_lc': value.handleLc, + 'updated_at': value.updatedAt, + 'cover_photo_sizes': value.coverPhotoSizes, + 'cover_photo_cids': CoverPhotoToJSON(value.coverPhotoCids), + 'cover_photo_legacy': value.coverPhotoLegacy, + 'profile_picture_sizes': value.profilePictureSizes, + 'profile_picture_cids': ProfilePictureToJSON(value.profilePictureCids), + 'profile_picture_legacy': value.profilePictureLegacy, + 'has_collectibles': value.hasCollectibles, + 'playlist_library': PlaylistLibraryToJSON(value.playlistLibrary), + 'allow_ai_attribution': value.allowAiAttribution, + 'profile_type': value.profileType, }; } diff --git a/packages/sdk/src/sdk/api/generated/default/models/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/UserCommentsResponseFull.ts b/packages/sdk/src/sdk/api/generated/default/models/UserCommentsResponseFull.ts new file mode 100644 index 00000000000..e7759defdaf --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserCommentsResponseFull.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Comment } from './Comment'; +import { + CommentFromJSON, + 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'; + +/** + * + * @export + * @interface UserCommentsResponseFull + */ +export interface UserCommentsResponseFull { + /** + * + * @type {number} + * @memberof UserCommentsResponseFull + */ + latestChainBlock: number; + /** + * + * @type {number} + * @memberof UserCommentsResponseFull + */ + latestIndexedBlock: number; + /** + * + * @type {number} + * @memberof UserCommentsResponseFull + */ + latestChainSlotPlays: number; + /** + * + * @type {number} + * @memberof UserCommentsResponseFull + */ + latestIndexedSlotPlays: number; + /** + * + * @type {string} + * @memberof UserCommentsResponseFull + */ + signature: string; + /** + * + * @type {string} + * @memberof UserCommentsResponseFull + */ + timestamp: string; + /** + * + * @type {VersionMetadata} + * @memberof UserCommentsResponseFull + */ + version: VersionMetadata; + /** + * + * @type {Array} + * @memberof UserCommentsResponseFull + */ + data?: Array; + /** + * + * @type {Related} + * @memberof UserCommentsResponseFull + */ + related?: Related; +} + +/** + * Check if a given object implements the UserCommentsResponseFull interface. + */ +export function instanceOfUserCommentsResponseFull(value: object): value is UserCommentsResponseFull { + 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 UserCommentsResponseFullFromJSON(json: any): UserCommentsResponseFull { + return UserCommentsResponseFullFromJSONTyped(json, false); +} + +export function UserCommentsResponseFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserCommentsResponseFull { + 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(CommentFromJSON)), + 'related': !exists(json, 'related') ? undefined : RelatedFromJSON(json['related']), + }; +} + +export function UserCommentsResponseFullToJSON(value?: UserCommentsResponseFull | 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(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/UserFull.ts b/packages/sdk/src/sdk/api/generated/default/models/UserFull.ts new file mode 100644 index 00000000000..fb2b6cd3c45 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UserFull.ts @@ -0,0 +1,602 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * Audius V1 API + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CoverPhoto } from './CoverPhoto'; +import { + CoverPhotoFromJSON, + CoverPhotoFromJSONTyped, + CoverPhotoToJSON, +} from './CoverPhoto'; +import type { 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'; + +/** + * + * @export + * @interface UserFull + */ +export interface UserFull { + /** + * + * @type {number} + * @memberof UserFull + */ + albumCount: number; + /** + * + * @type {string} + * @memberof UserFull + */ + artistPickTrackId?: string; + /** + * + * @type {UserArtistCoinBadge} + * @memberof UserFull + */ + artistCoinBadge: UserArtistCoinBadge; + /** + * + * @type {string} + * @memberof UserFull + */ + coinFlairMint?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + bio?: string; + /** + * + * @type {CoverPhoto} + * @memberof UserFull + */ + coverPhoto?: CoverPhoto; + /** + * + * @type {number} + * @memberof UserFull + */ + followeeCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + followerCount: number; + /** + * + * @type {string} + * @memberof UserFull + */ + handle: string; + /** + * + * @type {string} + * @memberof UserFull + */ + id: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isVerified: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + twitterHandle?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + instagramHandle?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + tiktokHandle?: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + verifiedWithTwitter: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + verifiedWithInstagram: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + verifiedWithTiktok: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + website?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + donation?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + location?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + name: string; + /** + * + * @type {number} + * @memberof UserFull + */ + playlistCount: number; + /** + * + * @type {ProfilePicture} + * @memberof UserFull + */ + profilePicture?: ProfilePicture; + /** + * + * @type {number} + * @memberof UserFull + */ + repostCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + trackCount: number; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isDeactivated: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isAvailable: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + ercWallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + splWallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + splUsdcWallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + splUsdcPayoutWallet?: string; + /** + * + * @type {number} + * @memberof UserFull + */ + supporterCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + supportingCount: number; + /** + * + * @type {number} + * @memberof UserFull + */ + totalAudioBalance: number; + /** + * The user's Ethereum wallet address for their account + * @type {string} + * @memberof UserFull + */ + wallet: string; + /** + * + * @type {string} + * @memberof UserFull + */ + balance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + associatedWalletsBalance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + totalBalance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + waudioBalance: string; + /** + * + * @type {string} + * @memberof UserFull + */ + associatedSolWalletsBalance: string; + /** + * + * @type {number} + * @memberof UserFull + */ + blocknumber: number; + /** + * + * @type {string} + * @memberof UserFull + */ + createdAt: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + isStorageV2: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + creatorNodeEndpoint?: string; + /** + * + * @type {number} + * @memberof UserFull + */ + currentUserFolloweeFollowCount: number; + /** + * + * @type {boolean} + * @memberof UserFull + */ + doesCurrentUserFollow: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + doesCurrentUserSubscribe: boolean; + /** + * + * @type {boolean} + * @memberof UserFull + */ + doesFollowCurrentUser: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + handleLc: string; + /** + * + * @type {string} + * @memberof UserFull + */ + updatedAt: string; + /** + * + * @type {string} + * @memberof UserFull + */ + coverPhotoSizes?: string; + /** + * + * @type {CoverPhoto} + * @memberof UserFull + */ + coverPhotoCids?: CoverPhoto; + /** + * + * @type {string} + * @memberof UserFull + */ + coverPhotoLegacy?: string; + /** + * + * @type {string} + * @memberof UserFull + */ + profilePictureSizes?: string; + /** + * + * @type {ProfilePicture} + * @memberof UserFull + */ + profilePictureCids?: ProfilePicture; + /** + * + * @type {string} + * @memberof UserFull + */ + profilePictureLegacy?: string; + /** + * + * @type {boolean} + * @memberof UserFull + */ + hasCollectibles: boolean; + /** + * + * @type {PlaylistLibrary} + * @memberof UserFull + */ + playlistLibrary?: PlaylistLibrary; + /** + * + * @type {boolean} + * @memberof UserFull + */ + allowAiAttribution: boolean; + /** + * + * @type {string} + * @memberof UserFull + */ + profileType?: string; +} + +/** + * Check if a given object implements the UserFull interface. + */ +export function instanceOfUserFull(value: object): value is UserFull { + let isInstance = true; + isInstance = isInstance && "albumCount" in value && value["albumCount"] !== undefined; + isInstance = isInstance && "artistCoinBadge" in value && value["artistCoinBadge"] !== undefined; + isInstance = isInstance && "followeeCount" in value && value["followeeCount"] !== undefined; + isInstance = isInstance && "followerCount" in value && value["followerCount"] !== undefined; + isInstance = isInstance && "handle" in value && value["handle"] !== undefined; + isInstance = isInstance && "id" in value && value["id"] !== undefined; + isInstance = isInstance && "isVerified" in value && value["isVerified"] !== undefined; + isInstance = isInstance && "verifiedWithTwitter" in value && value["verifiedWithTwitter"] !== undefined; + isInstance = isInstance && "verifiedWithInstagram" in value && value["verifiedWithInstagram"] !== undefined; + isInstance = isInstance && "verifiedWithTiktok" in value && value["verifiedWithTiktok"] !== undefined; + isInstance = isInstance && "name" in value && value["name"] !== undefined; + isInstance = isInstance && "playlistCount" in value && value["playlistCount"] !== undefined; + isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; + isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; + isInstance = isInstance && "isDeactivated" in value && value["isDeactivated"] !== undefined; + isInstance = isInstance && "isAvailable" in value && value["isAvailable"] !== undefined; + isInstance = isInstance && "ercWallet" in value && value["ercWallet"] !== undefined; + isInstance = isInstance && "splWallet" in value && value["splWallet"] !== undefined; + isInstance = isInstance && "splUsdcWallet" in value && value["splUsdcWallet"] !== undefined; + isInstance = isInstance && "supporterCount" in value && value["supporterCount"] !== undefined; + isInstance = isInstance && "supportingCount" in value && value["supportingCount"] !== undefined; + isInstance = isInstance && "totalAudioBalance" in value && value["totalAudioBalance"] !== undefined; + isInstance = isInstance && "wallet" in value && value["wallet"] !== undefined; + isInstance = isInstance && "balance" in value && value["balance"] !== undefined; + isInstance = isInstance && "associatedWalletsBalance" in value && value["associatedWalletsBalance"] !== undefined; + isInstance = isInstance && "totalBalance" in value && value["totalBalance"] !== undefined; + isInstance = isInstance && "waudioBalance" in value && value["waudioBalance"] !== undefined; + isInstance = isInstance && "associatedSolWalletsBalance" in value && value["associatedSolWalletsBalance"] !== undefined; + isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; + isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; + isInstance = isInstance && "isStorageV2" in value && value["isStorageV2"] !== undefined; + isInstance = isInstance && "currentUserFolloweeFollowCount" in value && value["currentUserFolloweeFollowCount"] !== undefined; + isInstance = isInstance && "doesCurrentUserFollow" in value && value["doesCurrentUserFollow"] !== undefined; + isInstance = isInstance && "doesCurrentUserSubscribe" in value && value["doesCurrentUserSubscribe"] !== undefined; + isInstance = isInstance && "doesFollowCurrentUser" in value && value["doesFollowCurrentUser"] !== undefined; + isInstance = isInstance && "handleLc" in value && value["handleLc"] !== undefined; + isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; + isInstance = isInstance && "hasCollectibles" in value && value["hasCollectibles"] !== undefined; + isInstance = isInstance && "allowAiAttribution" in value && value["allowAiAttribution"] !== undefined; + + return isInstance; +} + +export function UserFullFromJSON(json: any): UserFull { + return UserFullFromJSONTyped(json, false); +} + +export function UserFullFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFull { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'albumCount': json['album_count'], + 'artistPickTrackId': !exists(json, 'artist_pick_track_id') ? undefined : json['artist_pick_track_id'], + 'artistCoinBadge': 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'], + 'followerCount': json['follower_count'], + 'handle': json['handle'], + 'id': json['id'], + 'isVerified': json['is_verified'], + 'twitterHandle': !exists(json, 'twitter_handle') ? undefined : json['twitter_handle'], + 'instagramHandle': !exists(json, 'instagram_handle') ? undefined : json['instagram_handle'], + 'tiktokHandle': !exists(json, 'tiktok_handle') ? undefined : json['tiktok_handle'], + 'verifiedWithTwitter': json['verified_with_twitter'], + 'verifiedWithInstagram': json['verified_with_instagram'], + 'verifiedWithTiktok': json['verified_with_tiktok'], + 'website': !exists(json, 'website') ? undefined : json['website'], + 'donation': !exists(json, 'donation') ? undefined : json['donation'], + 'location': !exists(json, 'location') ? undefined : json['location'], + 'name': json['name'], + 'playlistCount': json['playlist_count'], + 'profilePicture': !exists(json, 'profile_picture') ? undefined : ProfilePictureFromJSON(json['profile_picture']), + 'repostCount': json['repost_count'], + 'trackCount': json['track_count'], + 'isDeactivated': json['is_deactivated'], + 'isAvailable': json['is_available'], + 'ercWallet': json['erc_wallet'], + 'splWallet': json['spl_wallet'], + 'splUsdcWallet': json['spl_usdc_wallet'], + 'splUsdcPayoutWallet': !exists(json, 'spl_usdc_payout_wallet') ? undefined : json['spl_usdc_payout_wallet'], + 'supporterCount': json['supporter_count'], + 'supportingCount': json['supporting_count'], + 'totalAudioBalance': json['total_audio_balance'], + 'wallet': json['wallet'], + 'balance': json['balance'], + 'associatedWalletsBalance': json['associated_wallets_balance'], + 'totalBalance': json['total_balance'], + 'waudioBalance': json['waudio_balance'], + 'associatedSolWalletsBalance': json['associated_sol_wallets_balance'], + 'blocknumber': json['blocknumber'], + 'createdAt': json['created_at'], + 'isStorageV2': json['is_storage_v2'], + 'creatorNodeEndpoint': !exists(json, 'creator_node_endpoint') ? undefined : json['creator_node_endpoint'], + 'currentUserFolloweeFollowCount': json['current_user_followee_follow_count'], + 'doesCurrentUserFollow': json['does_current_user_follow'], + 'doesCurrentUserSubscribe': json['does_current_user_subscribe'], + 'doesFollowCurrentUser': json['does_follow_current_user'], + 'handleLc': json['handle_lc'], + 'updatedAt': json['updated_at'], + 'coverPhotoSizes': !exists(json, 'cover_photo_sizes') ? undefined : json['cover_photo_sizes'], + 'coverPhotoCids': !exists(json, 'cover_photo_cids') ? undefined : CoverPhotoFromJSON(json['cover_photo_cids']), + 'coverPhotoLegacy': !exists(json, 'cover_photo_legacy') ? undefined : json['cover_photo_legacy'], + 'profilePictureSizes': !exists(json, 'profile_picture_sizes') ? undefined : json['profile_picture_sizes'], + 'profilePictureCids': !exists(json, 'profile_picture_cids') ? undefined : ProfilePictureFromJSON(json['profile_picture_cids']), + 'profilePictureLegacy': !exists(json, 'profile_picture_legacy') ? undefined : json['profile_picture_legacy'], + 'hasCollectibles': json['has_collectibles'], + 'playlistLibrary': !exists(json, 'playlist_library') ? undefined : PlaylistLibraryFromJSON(json['playlist_library']), + 'allowAiAttribution': json['allow_ai_attribution'], + 'profileType': !exists(json, 'profile_type') ? undefined : json['profile_type'], + }; +} + +export function UserFullToJSON(value?: UserFull | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'album_count': value.albumCount, + 'artist_pick_track_id': value.artistPickTrackId, + 'artist_coin_badge': UserArtistCoinBadgeToJSON(value.artistCoinBadge), + 'coin_flair_mint': value.coinFlairMint, + 'bio': value.bio, + 'cover_photo': CoverPhotoToJSON(value.coverPhoto), + 'followee_count': value.followeeCount, + 'follower_count': value.followerCount, + 'handle': value.handle, + 'id': value.id, + 'is_verified': value.isVerified, + 'twitter_handle': value.twitterHandle, + 'instagram_handle': value.instagramHandle, + 'tiktok_handle': value.tiktokHandle, + 'verified_with_twitter': value.verifiedWithTwitter, + 'verified_with_instagram': value.verifiedWithInstagram, + 'verified_with_tiktok': value.verifiedWithTiktok, + 'website': value.website, + 'donation': value.donation, + 'location': value.location, + 'name': value.name, + 'playlist_count': value.playlistCount, + 'profile_picture': ProfilePictureToJSON(value.profilePicture), + 'repost_count': value.repostCount, + 'track_count': value.trackCount, + 'is_deactivated': value.isDeactivated, + 'is_available': value.isAvailable, + 'erc_wallet': value.ercWallet, + 'spl_wallet': value.splWallet, + 'spl_usdc_wallet': value.splUsdcWallet, + 'spl_usdc_payout_wallet': value.splUsdcPayoutWallet, + 'supporter_count': value.supporterCount, + 'supporting_count': value.supportingCount, + 'total_audio_balance': value.totalAudioBalance, + 'wallet': value.wallet, + 'balance': value.balance, + 'associated_wallets_balance': value.associatedWalletsBalance, + 'total_balance': value.totalBalance, + 'waudio_balance': value.waudioBalance, + 'associated_sol_wallets_balance': value.associatedSolWalletsBalance, + 'blocknumber': value.blocknumber, + 'created_at': value.createdAt, + 'is_storage_v2': value.isStorageV2, + 'creator_node_endpoint': value.creatorNodeEndpoint, + 'current_user_followee_follow_count': value.currentUserFolloweeFollowCount, + 'does_current_user_follow': value.doesCurrentUserFollow, + 'does_current_user_subscribe': value.doesCurrentUserSubscribe, + 'does_follow_current_user': value.doesFollowCurrentUser, + 'handle_lc': value.handleLc, + 'updated_at': value.updatedAt, + 'cover_photo_sizes': value.coverPhotoSizes, + 'cover_photo_cids': CoverPhotoToJSON(value.coverPhotoCids), + 'cover_photo_legacy': value.coverPhotoLegacy, + 'profile_picture_sizes': value.profilePictureSizes, + 'profile_picture_cids': ProfilePictureToJSON(value.profilePictureCids), + 'profile_picture_legacy': value.profilePictureLegacy, + 'has_collectibles': value.hasCollectibles, + 'playlist_library': PlaylistLibraryToJSON(value.playlistLibrary), + 'allow_ai_attribution': value.allowAiAttribution, + 'profile_type': value.profileType, + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/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 e3db1f66a54..ef0dbc44e25 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/index.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/index.ts @@ -1,10 +1,34 @@ /* tslint:disable */ /* eslint-disable */ export * from './Access'; +export * from './AccessGate'; export * from './AccessInfoResponse'; +export * from './Account'; +export * from './AccountCollection'; +export * from './AccountCollectionUser'; +export * from './AccountFull'; export * from './Activity'; +export * from './ActivityFull'; export * from './AlbumBacklink'; export * from './AlbumsResponse'; +export * from './AlbumsResponseFull'; +export * from './AnnouncementNotification'; +export * from './AnnouncementNotificationAction'; +export * from './AnnouncementNotificationActionData'; +export * from './ApproveManagerRequestNotification'; +export * from './ApproveManagerRequestNotificationAction'; +export * from './ApproveManagerRequestNotificationActionData'; +export * from './ArtistRemixContestEndedNotification'; +export * from './ArtistRemixContestEndedNotificationAction'; +export * from './ArtistRemixContestEndedNotificationActionData'; +export * from './ArtistRemixContestEndingSoonNotification'; +export * from './ArtistRemixContestEndingSoonNotificationAction'; +export * from './ArtistRemixContestEndingSoonNotificationActionData'; +export * from './ArtistRemixContestSubmissionsNotification'; +export * from './ArtistRemixContestSubmissionsNotificationAction'; +export * from './ArtistRemixContestSubmissionsNotificationActionData'; +export * from './Attestation'; +export * from './AttestationReponse'; export * from './AuthorizedApp'; export * from './AuthorizedApps'; export * from './BalanceHistoryDataPoint'; @@ -12,18 +36,28 @@ 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 './ClaimRewardsRequest'; export * from './ClaimRewardsResponse'; export * from './ClaimRewardsResponseDataInner'; +export * from './ClaimableRewardNotification'; +export * from './ClaimableRewardNotificationAction'; +export * from './ClaimableRewardNotificationActionData'; export * from './ClaimedPrize'; export * from './ClaimedPrizesResponse'; export * from './Coin'; 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'; @@ -36,21 +70,48 @@ export * from './CoinsVolumeLeadersResponseDataInner'; export * from './Collectibles'; export * from './CollectiblesResponse'; export * from './CollectionActivity'; +export * from './CollectionActivityFullWithoutTracks'; +export * from './CollectionActivityWithoutTracks'; +export * from './CollectionLibraryResponse'; +export * from './CollectionLibraryResponseFull'; export * from './Comment'; export * from './CommentMention'; +export * from './CommentMentionNotification'; +export * from './CommentMentionNotificationAction'; +export * from './CommentMentionNotificationActionData'; +export * from './CommentNotification'; +export * from './CommentNotificationAction'; +export * from './CommentNotificationActionData'; export * from './CommentNotificationSetting'; +export * from './CommentReactionNotification'; +export * from './CommentReactionNotificationAction'; +export * from './CommentReactionNotificationActionData'; export * from './CommentRepliesResponse'; export * from './CommentResponse'; +export * from './CommentThreadNotification'; +export * from './CommentThreadNotificationAction'; +export * from './CommentThreadNotificationActionData'; export * from './ConnectedWallets'; export * from './ConnectedWalletsResponse'; +export * from './CosignNotification'; +export * from './CosignNotificationAction'; +export * from './CosignNotificationActionData'; +export * from './CoverArt'; export * from './CoverPhoto'; +export * from './CoverPhotoFull'; export * from './CreateCoinRequest'; export * from './CreateCoinResponse'; export * from './CreateCoinResponseData'; +export * from './CreateNotification'; +export * from './CreateNotificationAction'; +export * from './CreateNotificationActionData'; +export * from './CreatePlaylistNotificationActionData'; export * from './CreateRewardCodeRequest'; export * from './CreateRewardCodeResponse'; +export * from './CreateTrackNotificationActionData'; export * from './DashboardWalletUser'; export * from './DashboardWalletUsersResponse'; +export * from './DataAndType'; export * from './DecodedUserToken'; export * from './DeveloperApp'; export * from './DeveloperAppResponse'; @@ -64,41 +125,135 @@ export * from './ExtendedPaymentSplit'; export * from './ExtendedPurchaseGate'; export * from './ExtendedTokenGate'; export * from './ExtendedUsdcGate'; +export * from './FanRemixContestEndedNotification'; +export * from './FanRemixContestEndedNotificationAction'; +export * from './FanRemixContestEndedNotificationActionData'; +export * from './FanRemixContestEndingSoonNotification'; +export * from './FanRemixContestEndingSoonNotificationAction'; +export * from './FanRemixContestEndingSoonNotificationActionData'; +export * from './FanRemixContestStartedNotification'; +export * from './FanRemixContestStartedNotificationAction'; +export * from './FanRemixContestStartedNotificationActionData'; +export * from './FanRemixContestWinnersSelectedNotification'; +export * from './FanRemixContestWinnersSelectedNotificationAction'; +export * from './FanRemixContestWinnersSelectedNotificationActionData'; export * from './Favorite'; export * from './FavoritesResponse'; +export * from './FieldVisibility'; export * from './FollowGate'; +export * from './FollowNotification'; +export * from './FollowNotificationAction'; +export * from './FollowNotificationActionData'; export * from './FollowersResponse'; export * from './FollowingResponse'; +export * from './FollowingResponseFull'; +export * from './FullFollowersResponse'; +export * from './FullGetSupportedUsers'; +export * from './FullGetSupporter'; +export * from './FullGetSupporters'; +export * from './FullGetSupporting'; +export * from './FullMutualFollowersResponse'; +export * from './FullPurchasersResponse'; +export * from './FullRemix'; +export * from './FullRemixParent'; +export * from './FullRemixersResponse'; +export * from './FullSubscribersResponse'; +export * from './FullSupporter'; +export * from './FullSupporting'; +export * from './FullTip'; 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 './HistoryResponseFull'; export * from './ListenCount'; +export * from './ListenStreakReminderNotification'; +export * from './ListenStreakReminderNotificationAction'; +export * from './ListenStreakReminderNotificationActionData'; +export * from './ManagedUser'; +export * from './ManagedUsersResponse'; +export * from './ManagersResponse'; +export * from './MediaLink'; +export * from './MilestoneNotification'; +export * from './MilestoneNotificationAction'; +export * from './MilestoneNotificationActionData'; export * from './MonthlyAggregatePlay'; export * from './MutualFollowersResponse'; export * from './NftCollection'; export * from './NftGate'; +export * from './Notification'; +export * from './Notifications'; +export * from './NotificationsResponse'; export * from './Playlist'; export * from './PlaylistAddedTimestamp'; export * from './PlaylistArtwork'; +export * from './PlaylistArtworkFull'; +export * from './PlaylistFeedItem'; +export * from './PlaylistFull'; +export * from './PlaylistFullWithoutTracks'; +export * from './PlaylistLibrary'; +export * from './PlaylistMilestoneNotificationActionData'; export * from './PlaylistResponse'; export * from './PlaylistSearchResult'; export * from './PlaylistTracksResponse'; +export * from './PlaylistUpdate'; +export * from './PlaylistUpdates'; +export * from './PlaylistUpdatesResponse'; +export * from './PlaylistWithoutTracks'; export * from './PlaylistsResponse'; +export * from './PlaylistsResponseFull'; export * from './PrizeClaimRequest'; export * from './PrizeClaimResponse'; export * from './PrizePublic'; export * from './PrizesResponse'; export * from './ProfilePicture'; +export * from './ProfilePictureFull'; +export * from './Purchase'; +export * from './PurchaseGate'; +export * from './PurchaseSplit'; +export * from './PurchasersCountResponse'; export * from './PurchasersResponse'; +export * from './PurchasesCountResponse'; +export * from './PurchasesResponse'; +export * from './Reaction'; +export * from './ReactionNotification'; +export * from './ReactionNotificationAction'; +export * from './ReactionNotificationActionData'; +export * from './Reactions'; +export * from './ReceiveTipNotification'; +export * from './ReceiveTipNotificationAction'; +export * from './ReceiveTipNotificationActionData'; export * from './RedeemAmountResponse'; +export * from './Related'; export * from './RelatedArtistResponse'; +export * from './RelatedArtistResponseFull'; +export * from './Remix'; +export * from './RemixNotification'; +export * from './RemixNotificationAction'; +export * from './RemixNotificationActionData'; export * from './RemixParent'; +export * from './RemixablesResponse'; export * from './RemixedTrackAggregate'; +export * from './RemixersCountResponse'; export * from './RemixersResponse'; +export * from './RemixesResponse'; +export * from './RemixingResponse'; export * from './ReplyComment'; +export * from './Repost'; +export * from './RepostNotification'; +export * from './RepostNotificationAction'; +export * from './RepostNotificationActionData'; +export * from './RepostOfRepostNotification'; +export * from './RepostOfRepostNotificationAction'; +export * from './RepostOfRepostNotificationActionData'; export * from './Reposts'; +export * from './RequestManagerNotification'; +export * from './RequestManagerNotificationAction'; +export * from './RequestManagerNotificationActionData'; export * from './RewardCodeErrorResponse'; export * from './RewardCodeResponse'; export * from './SaleJson'; @@ -106,48 +261,134 @@ 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 './SearchPlaylistFull'; +export * from './SearchResponse'; +export * from './SearchTrack'; +export * from './SearchTrackFull'; +export * from './SendTipNotification'; +export * from './SendTipNotificationAction'; +export * from './SendTipNotificationActionData'; export * from './Stem'; +export * from './StemFull'; +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 './TopUsersResponseFull'; export * from './Track'; export * from './TrackAccessInfo'; export * from './TrackActivity'; +export * from './TrackActivityFull'; +export * from './TrackAddedToPlaylistNotification'; +export * from './TrackAddedToPlaylistNotificationAction'; +export * from './TrackAddedToPlaylistNotificationActionData'; +export * from './TrackAddedToPurchasedAlbumNotification'; +export * from './TrackAddedToPurchasedAlbumNotificationAction'; +export * from './TrackAddedToPurchasedAlbumNotificationActionData'; export * from './TrackArtwork'; +export * from './TrackArtworkFull'; export * from './TrackCommentCountResponse'; export * from './TrackCommentNotificationResponse'; export * from './TrackCommentsResponse'; export * from './TrackElement'; +export * from './TrackFavoritesResponse'; +export * from './TrackFeedItem'; +export * from './TrackFull'; +export * from './TrackId'; export * from './TrackInspect'; export * from './TrackInspectList'; +export * from './TrackLibraryResponse'; +export * from './TrackLibraryResponseFull'; +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 './UpdateCoinRequest'; export * from './UpdateCoinResponse'; +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 './UserCommentsResponseFull'; +export * from './UserFeedItem'; +export * from './UserFeedResponse'; +export * from './UserFull'; export * from './UserIdAddress'; export * from './UserIdsAddressesResponse'; +export * from './UserManager'; +export * from './UserMilestoneNotificationActionData'; 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'; diff --git a/packages/sdk/src/sdk/api/generated/full/.openapi-generator/FILES b/packages/sdk/src/sdk/api/generated/full/.openapi-generator/FILES index 42dcb4d043a..46828f852e8 100644 --- a/packages/sdk/src/sdk/api/generated/full/.openapi-generator/FILES +++ b/packages/sdk/src/sdk/api/generated/full/.openapi-generator/FILES @@ -62,6 +62,7 @@ models/CollectionActivityFull.ts models/CollectionActivityFullWithoutTracks.ts models/CollectionLibraryResponseFull.ts models/Comment.ts +models/CommentEntityType.ts models/CommentMention.ts models/CommentMentionNotification.ts models/CommentMentionNotificationAction.ts diff --git a/packages/sdk/src/sdk/api/generated/full/models/Comment.ts b/packages/sdk/src/sdk/api/generated/full/models/Comment.ts index aeb0335fd67..f1c108676f3 100644 --- a/packages/sdk/src/sdk/api/generated/full/models/Comment.ts +++ b/packages/sdk/src/sdk/api/generated/full/models/Comment.ts @@ -14,6 +14,12 @@ */ import { exists, mapValues } from '../runtime'; +import type { CommentEntityType } from './CommentEntityType'; +import { + CommentEntityTypeFromJSON, + CommentEntityTypeFromJSONTyped, + CommentEntityTypeToJSON, +} from './CommentEntityType'; import type { CommentMention } from './CommentMention'; import { CommentMentionFromJSON, @@ -47,10 +53,10 @@ export interface Comment { entityId: string; /** * - * @type {string} + * @type {CommentEntityType} * @memberof Comment */ - entityType: string; + entityType: CommentEntityType; /** * * @type {string} @@ -172,7 +178,7 @@ export function CommentFromJSONTyped(json: any, ignoreDiscriminator: boolean): C 'id': json['id'], 'entityId': json['entity_id'], - 'entityType': json['entity_type'], + 'entityType': CommentEntityTypeFromJSON(json['entity_type']), 'userId': !exists(json, 'user_id') ? undefined : json['user_id'], 'message': json['message'], 'mentions': !exists(json, 'mentions') ? undefined : ((json['mentions'] as Array).map(CommentMentionFromJSON)), @@ -202,7 +208,7 @@ export function CommentToJSON(value?: Comment | null): any { 'id': value.id, 'entity_id': value.entityId, - 'entity_type': value.entityType, + 'entity_type': CommentEntityTypeToJSON(value.entityType), 'user_id': value.userId, 'message': value.message, 'mentions': value.mentions === undefined ? undefined : ((value.mentions as Array).map(CommentMentionToJSON)), diff --git a/packages/sdk/src/sdk/api/generated/full/models/CommentEntityType.ts b/packages/sdk/src/sdk/api/generated/full/models/CommentEntityType.ts new file mode 100644 index 00000000000..1cb0f2ca916 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/full/models/CommentEntityType.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck +/** + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Type of entity that can be commented on + * @export + */ +export const CommentEntityType = { + Track: 'Track' +} as const; +export type CommentEntityType = typeof CommentEntityType[keyof typeof CommentEntityType]; + + +export function CommentEntityTypeFromJSON(json: any): CommentEntityType { + return CommentEntityTypeFromJSONTyped(json, false); +} + +export function CommentEntityTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentEntityType { + return json as CommentEntityType; +} + +export function CommentEntityTypeToJSON(value?: CommentEntityType | null): any { + return value as any; +} + diff --git a/packages/sdk/src/sdk/api/generated/full/models/ReplyComment.ts b/packages/sdk/src/sdk/api/generated/full/models/ReplyComment.ts index 19ba5f7be55..6cdcc0e7014 100644 --- a/packages/sdk/src/sdk/api/generated/full/models/ReplyComment.ts +++ b/packages/sdk/src/sdk/api/generated/full/models/ReplyComment.ts @@ -14,6 +14,12 @@ */ import { exists, mapValues } from '../runtime'; +import type { CommentEntityType } from './CommentEntityType'; +import { + CommentEntityTypeFromJSON, + CommentEntityTypeFromJSONTyped, + CommentEntityTypeToJSON, +} from './CommentEntityType'; import type { CommentMention } from './CommentMention'; import { CommentMentionFromJSON, @@ -41,10 +47,10 @@ export interface ReplyComment { entityId: string; /** * - * @type {string} + * @type {CommentEntityType} * @memberof ReplyComment */ - entityType: string; + entityType: CommentEntityType; /** * * @type {string} @@ -142,7 +148,7 @@ export function ReplyCommentFromJSONTyped(json: any, ignoreDiscriminator: boolea 'id': json['id'], 'entityId': json['entity_id'], - 'entityType': json['entity_type'], + 'entityType': CommentEntityTypeFromJSON(json['entity_type']), 'userId': json['user_id'], 'message': json['message'], 'mentions': !exists(json, 'mentions') ? undefined : ((json['mentions'] as Array).map(CommentMentionFromJSON)), @@ -168,7 +174,7 @@ export function ReplyCommentToJSON(value?: ReplyComment | null): any { 'id': value.id, 'entity_id': value.entityId, - 'entity_type': value.entityType, + 'entity_type': CommentEntityTypeToJSON(value.entityType), 'user_id': value.userId, 'message': value.message, 'mentions': value.mentions === undefined ? undefined : ((value.mentions as Array).map(CommentMentionToJSON)), diff --git a/packages/sdk/src/sdk/api/generated/full/models/index.ts b/packages/sdk/src/sdk/api/generated/full/models/index.ts index 0c5cc96ca24..2fccf1ba452 100644 --- a/packages/sdk/src/sdk/api/generated/full/models/index.ts +++ b/packages/sdk/src/sdk/api/generated/full/models/index.ts @@ -47,6 +47,7 @@ export * from './CollectionActivityFull'; export * from './CollectionActivityFullWithoutTracks'; export * from './CollectionLibraryResponseFull'; export * from './Comment'; +export * from './CommentEntityType'; export * from './CommentMention'; export * from './CommentMentionNotification'; export * from './CommentMentionNotificationAction'; diff --git a/packages/sdk/src/sdk/api/generator/gen.js b/packages/sdk/src/sdk/api/generator/gen.js index a8c604c20ea..cc969946840 100644 --- a/packages/sdk/src/sdk/api/generator/gen.js +++ b/packages/sdk/src/sdk/api/generator/gen.js @@ -45,7 +45,14 @@ const clearOutput = ({ apiFlavor }) => { fs.mkdirSync(path.join(process.env.PWD, OUT_DIR)) } -const downloadSpec = async ({ env, apiVersion, apiFlavor }) => { +const downloadSpec = async ({ env, apiVersion, apiFlavor, local }) => { + if (local) { + const srcPath = path.resolve(process.env.PWD, local) + const spec = fs.readFileSync(srcPath, 'utf8') + fs.writeFileSync(path.join(process.env.PWD, SWAGGER_SPEC_PATH), spec) + console.info(`Using local spec: ${srcPath}`) + return + } // Setup args let baseURL = '' if (env === 'dev') { @@ -83,6 +90,10 @@ 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( + '--local ', + 'Use local swagger file instead of fetching (e.g. ../../../../api/api/swagger/swagger-v1.yaml)' + ) .option('--generator ', 'The generator to use', 'typescript-fetch') .action(async (options) => { clearOutput(options) diff --git a/packages/sdk/src/sdk/api/notifications/NotificationsApi.test.ts b/packages/sdk/src/sdk/api/notifications/NotificationsApi.test.ts index 82fac3f22b6..ab81b372ded 100644 --- a/packages/sdk/src/sdk/api/notifications/NotificationsApi.test.ts +++ b/packages/sdk/src/sdk/api/notifications/NotificationsApi.test.ts @@ -2,7 +2,10 @@ import { describe, it, beforeAll, expect, vitest } from 'vitest' import { createAppWalletClient } from '../../services/AudiusWalletClient' import { EntityManagerClient } from '../../services/EntityManager' -import { Configuration } from '../generated/default' +import { + Configuration, + NotificationsApi as NotificationsApiGenerated +} from '../generated/default' import { NotificationsApi } from './NotificationsApi' @@ -29,7 +32,8 @@ describe('NotificationsApi', () => { new EntityManagerClient({ audiusWalletClient: createAppWalletClient({ apiKey: '' }), endpoint: 'https://discoveryprovider.audius.co' - }) + }), + new NotificationsApiGenerated(new Configuration()) ) vitest.spyOn(console, 'warn').mockImplementation(() => {}) vitest.spyOn(console, 'info').mockImplementation(() => {}) diff --git a/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts b/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts index 3e2f1c3c165..54c1e7767e5 100644 --- a/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts +++ b/packages/sdk/src/sdk/api/notifications/NotificationsApi.ts @@ -1,4 +1,7 @@ -import type { Configuration } from '../../api/generated/default' +import type { + Configuration, + NotificationsApi as NotificationsApiGenerated +} from '../../api/generated/default' import type { EntityManagerService } from '../../services' import { Action, EntityType } from '../../services/EntityManager/types' import { parseParams } from '../../utils/parseParams' @@ -14,9 +17,26 @@ export class NotificationsApi { // eslint-disable-next-line no-useless-constructor constructor( _config: Configuration, - private readonly entityManager: EntityManagerService + private readonly entityManager: EntityManagerService, + private readonly generated: NotificationsApiGenerated ) {} + /** + * Get notifications for user ID + */ + async getNotifications( + params: Parameters[0] + ) { + return this.generated.getNotifications(params) + } + + /** + * Get playlists the user has saved that have been updated + */ + async getPlaylistUpdates(params: { userId: string }) { + return this.generated.getPlaylistUpdates(params) + } + /** * When a user views all of their notifications */ diff --git a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts index e0d7e23b30c..3a4e8e07e34 100644 --- a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts +++ b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.test.ts @@ -83,6 +83,13 @@ vitest .spyOn(GeneratedPlaylistsApi.prototype, 'getPlaylist') .mockImplementation(async () => { return { + latestChainBlock: 1, + latestIndexedBlock: 1, + latestChainSlotPlays: 1, + latestIndexedSlotPlays: 1, + signature: '', + timestamp: '', + version: { service: 'test', version: '1' }, data: [ { playlistName: 'test', diff --git a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts index 160000c5848..fb8f6835029 100644 --- a/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts +++ b/packages/sdk/src/sdk/api/playlists/PlaylistsApi.ts @@ -405,11 +405,23 @@ export class PlaylistsApi extends GeneratedPlaylistsApi { UpdatePlaylistMetadataSchema.shape ) + const picked = pick(playlist, supportedUpdateFields) as Record< + string, + unknown + > + // API returns releaseDate as string; updateMetadata expects Date + const normalizedMetadata = { + ...picked, + ...(picked.releaseDate != null && typeof picked.releaseDate === 'string' + ? { releaseDate: new Date(picked.releaseDate) } + : {}) + } as UpdatePlaylistRequest['metadata'] + return await this.updatePlaylist( { userId, playlistId, - metadata: updateMetadata(pick(playlist, supportedUpdateFields)) + metadata: updateMetadata(normalizedMetadata) }, advancedOptions ) diff --git a/packages/sdk/src/sdk/sdk.ts b/packages/sdk/src/sdk/sdk.ts index 008cbb12b17..e71e4e4d72c 100644 --- a/packages/sdk/src/sdk/sdk.ts +++ b/packages/sdk/src/sdk/sdk.ts @@ -13,8 +13,10 @@ import { CoinsApi, Configuration, ExploreApi, + NotificationsApi as NotificationsApiGenerated, PrizesApi, RewardsApi, + SearchApi, TipsApi, WalletApi } from './api/generated/default' @@ -500,6 +502,8 @@ const initializeApis = ({ services.logger ) + const search = new SearchApi(apiClientConfig) + const grants = new GrantsApi(apiClientConfig, services.entityManager, users) const developerApps = new DeveloperAppsApi( @@ -514,7 +518,8 @@ const initializeApis = ({ const notifications = new NotificationsApi( apiClientConfig, - services.entityManager + services.entityManager, + new NotificationsApiGenerated(apiClientConfig) ) const generatedApiClientConfigFull = new ConfigurationFull({ @@ -549,6 +554,7 @@ const initializeApis = ({ users, albums, playlists, + search, tips, resolve, full, diff --git a/packages/web/src/common/store/cache/collections/commonSagas.ts b/packages/web/src/common/store/cache/collections/commonSagas.ts index 2a8920641bd..40b36676c8d 100644 --- a/packages/web/src/common/store/cache/collections/commonSagas.ts +++ b/packages/web/src/common/store/cache/collections/commonSagas.ts @@ -209,14 +209,15 @@ function* confirmEditPlaylist( playlistId: Id.parse(playlistId) }) } - const { data: playlist } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + const playlistRes = yield* call( + [sdk.playlists, sdk.playlists.getPlaylist], { userId: OptionalId.parse(userId), playlistId: Id.parse(playlistId) } ) - return playlist?.[0] ? userCollectionMetadataFromSDK(playlist[0]) : null + const playlistData = playlistRes?.data?.[0] + return playlistData ? userCollectionMetadataFromSDK(playlistData) : null }, function* (confirmedPlaylist: Collection) { const done = yield* isPlaylistConfirmerDone(playlistId) @@ -513,14 +514,15 @@ function* confirmPublishPlaylist( playlistId: Id.parse(playlistId) }) - const { data } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + const playlistRes = yield* call( + [sdk.playlists, sdk.playlists.getPlaylist], { userId: OptionalId.parse(userId), playlistId: Id.parse(playlistId) } ) - return data?.[0] ? userCollectionMetadataFromSDK(data[0]) : null + const playlistData = playlistRes?.data?.[0] + return playlistData ? userCollectionMetadataFromSDK(playlistData) : null }, function* (confirmedPlaylist: Collection) { const done = yield* isPlaylistConfirmerDone(playlistId) diff --git a/packages/web/src/common/store/cache/collections/createAlbumSaga.ts b/packages/web/src/common/store/cache/collections/createAlbumSaga.ts index 90e7df94136..839e198e6c5 100644 --- a/packages/web/src/common/store/cache/collections/createAlbumSaga.ts +++ b/packages/web/src/common/store/cache/collections/createAlbumSaga.ts @@ -175,16 +175,13 @@ function* createAndConfirmAlbum( metadata: albumMetadataForCreateWithSDK(formFields) }) - const { data: album } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], - { - userId: OptionalId.parse(userId), - playlistId: Id.parse(albumId) - } - ) + const albumRes = yield* call([sdk.playlists, sdk.playlists.getPlaylist], { + userId: OptionalId.parse(userId), + playlistId: Id.parse(albumId) + }) - const confirmedAlbum = album?.[0] - ? userCollectionMetadataFromSDK(album[0]) + const confirmedAlbum = albumRes?.data?.[0] + ? userCollectionMetadataFromSDK(albumRes.data[0]) : null if (!confirmedAlbum) { throw new Error( diff --git a/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts b/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts index 44ca8969bb7..372c43d37fc 100644 --- a/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts +++ b/packages/web/src/common/store/cache/collections/createPlaylistSaga.ts @@ -200,16 +200,16 @@ function* createAndConfirmPlaylist( // Merge the confirmed playlist with the optimistic playlist, preferring // optimistic data in case other unconfirmed edits have been made. - const { data: playlist } = yield* call( - [sdk.full.playlists, sdk.full.playlists.getPlaylist], + const playlistRes = yield* call( + [sdk.playlists, sdk.playlists.getPlaylist], { userId: OptionalId.parse(userId), playlistId: Id.parse(playlistId) } ) - const confirmedPlaylist = playlist?.[0] - ? userCollectionMetadataFromSDK(playlist[0]) + const confirmedPlaylist = playlistRes?.data?.[0] + ? userCollectionMetadataFromSDK(playlistRes.data[0]) : null if (!confirmedPlaylist) { throw new Error( diff --git a/packages/web/src/common/store/cache/tracks/sagas.ts b/packages/web/src/common/store/cache/tracks/sagas.ts index 24a00058ecd..42feda47b32 100644 --- a/packages/web/src/common/store/cache/tracks/sagas.ts +++ b/packages/web/src/common/store/cache/tracks/sagas.ts @@ -228,11 +228,12 @@ function* confirmEditTrack( generatePreview }) - const { data } = yield* call( - [sdk.full.tracks, sdk.full.tracks.getTrack], - { trackId: Id.parse(trackId), userId: OptionalId.parse(userId) } - ) - return data ? userTrackMetadataFromSDK(data) : null + const { data } = yield* call([sdk.tracks, sdk.tracks.getTrack], { + trackId: Id.parse(trackId), + userId: OptionalId.parse(userId) + }) + const trackData = data + return trackData ? userTrackMetadataFromSDK(trackData) : null }, function* (confirmedTrack: TrackMetadataForUpload & Track) { if (wasUnlisted && isNowListed) { @@ -313,11 +314,12 @@ function* confirmDeleteTrack(track: Track) { const track = yield* queryTrack(trackId) if (!track) return - const { data } = yield* call( - [sdk.full.tracks, sdk.full.tracks.getTrack], - { trackId: Id.parse(trackId), userId: OptionalId.parse(userId) } - ) - return data ? userTrackMetadataFromSDK(data) : null + const { data } = yield* call([sdk.tracks, sdk.tracks.getTrack], { + trackId: Id.parse(trackId), + userId: OptionalId.parse(userId) + }) + const trackData = data + return trackData ? userTrackMetadataFromSDK(trackData) : null }, function* (deletedTrack: Track) { // NOTE: we do not delete from the cache as the track may be playing diff --git a/packages/web/src/common/store/pages/feed/lineup/sagas.ts b/packages/web/src/common/store/pages/feed/lineup/sagas.ts index e17cc8011d8..87ae1894059 100644 --- a/packages/web/src/common/store/pages/feed/lineup/sagas.ts +++ b/packages/web/src/common/store/pages/feed/lineup/sagas.ts @@ -59,18 +59,15 @@ function* getTracks({ const followeeUserIds = yield* select(getFollowIds) const userId = Id.parse(currentUserId) - const { data = [] } = yield* call( - [sdk.full.users, sdk.full.users.getUserFeed], - { - id: userId, - userId, - filter, - limit, - offset, - followeeUserId: followeeUserIds.length ? followeeUserIds : undefined, - withUsers: true - } - ) + const { data = [] } = yield* call([sdk.users, sdk.users.getUserFeed], { + id: userId, + userId, + filter, + limit, + offset, + followeeUserId: followeeUserIds.length ? followeeUserIds : undefined, + withUsers: true + }) const feed = transformAndCleanList(data, userFeedItemFromSDK).map( ({ item }) => item ) diff --git a/packages/web/src/common/store/pages/library/sagas.ts b/packages/web/src/common/store/pages/library/sagas.ts index 79f52dfe298..baca5cefb2c 100644 --- a/packages/web/src/common/store/pages/library/sagas.ts +++ b/packages/web/src/common/store/pages/library/sagas.ts @@ -56,7 +56,7 @@ function* sendLibraryRequest({ const sdk = yield* call(audiusSdk) const libraryTracksResponse = yield* call( - [sdk.full.users, sdk.full.users.getUserLibraryTracks], + [sdk.users, sdk.users.getUserLibraryTracks], { id: Id.parse(userId), userId: Id.parse(userId), diff --git a/packages/web/src/common/store/pages/premium-tracks/lineups/tracks/sagas.ts b/packages/web/src/common/store/pages/premium-tracks/lineups/tracks/sagas.ts index 049ad4debf7..a4e955059ad 100644 --- a/packages/web/src/common/store/pages/premium-tracks/lineups/tracks/sagas.ts +++ b/packages/web/src/common/store/pages/premium-tracks/lineups/tracks/sagas.ts @@ -28,7 +28,7 @@ function* getPremiumTracks({ const sdk = yield* getSDK() const currentUserId = yield* call(queryCurrentUserId) const { data = [] } = yield* call( - [sdk.full.tracks, sdk.full.tracks.getTrendingUSDCPurchaseTracks], + [sdk.tracks, sdk.tracks.getTrendingUSDCPurchaseTracks], { limit, offset, userId: OptionalId.parse(currentUserId) } ) const tracks = transformAndCleanList(data, userTrackMetadataFromSDK) diff --git a/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts b/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts index 3dd42ac89fb..869fe4ea6c0 100644 --- a/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts +++ b/packages/web/src/common/store/pages/profile/lineups/feed/retrieveUserReposts.ts @@ -48,7 +48,7 @@ export function* retrieveUserReposts({ yield* waitForRead() const sdk = yield* getSDK() - const { data: repostsSDKData } = yield sdk.full.users.getRepostsByHandle({ + const { data: repostsSDKData } = yield sdk.users.getRepostsByHandle({ handle, userId: OptionalId.parse(currentUserId), limit, diff --git a/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts b/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts index c2a5e186c67..35ddd3ecc23 100644 --- a/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts +++ b/packages/web/src/common/store/pages/profile/lineups/tracks/retrieveUserTracks.ts @@ -31,7 +31,7 @@ export function* retrieveUserTracks({ }: RetrieveUserTracksArgs): Generator { const sdk = yield* getSDK() const { data = [] } = yield* call( - [sdk.full.users, sdk.full.users.getTracksByUserHandle], + [sdk.users, sdk.users.getTracksByUserHandle], { handle, sort, diff --git a/packages/web/src/common/store/pages/trending-underground/lineups/sagas.ts b/packages/web/src/common/store/pages/trending-underground/lineups/sagas.ts index 8f30c453ff0..ce3561ca673 100644 --- a/packages/web/src/common/store/pages/trending-underground/lineups/sagas.ts +++ b/packages/web/src/common/store/pages/trending-underground/lineups/sagas.ts @@ -44,16 +44,14 @@ function* getTrendingUnderground({ const { data = [] } = version ? yield* call( - [ - sdk.full.tracks, - sdk.full.tracks.getUndergroundTrendingTracksWithVersion - ], + [sdk.tracks, sdk.tracks.getUndergroundTrendingTracksWithVersion], { version, offset, limit, userId: OptionalId.parse(currentUserId) } ) - : yield* call( - [sdk.full.tracks, sdk.full.tracks.getUndergroundTrendingTracks], - { offset, limit, userId: OptionalId.parse(currentUserId) } - ) + : yield* call([sdk.tracks, sdk.tracks.getUndergroundTrendingTracks], { + offset, + limit, + userId: OptionalId.parse(currentUserId) + }) let tracks = transformAndCleanList(data, userTrackMetadataFromSDK) diff --git a/packages/web/src/common/store/pages/trending/lineups/trending/retrieveTrending.ts b/packages/web/src/common/store/pages/trending/lineups/trending/retrieveTrending.ts index 95377dd2711..d673d0ecc40 100644 --- a/packages/web/src/common/store/pages/trending/lineups/trending/retrieveTrending.ts +++ b/packages/web/src/common/store/pages/trending/lineups/trending/retrieveTrending.ts @@ -73,8 +73,8 @@ export function* retrieveTrending({ } const { data = [] } = version - ? yield sdk.full.tracks.getTrendingTracksWithVersion({ ...args, version }) - : yield sdk.full.tracks.getTrendingTracks(args) + ? yield sdk.tracks.getTrendingTracksWithVersion({ ...args, version }) + : yield sdk.tracks.getTrendingTracks(args) let apiTracks = transformAndCleanList(data, userTrackMetadataFromSDK) // DN may return hidden tracks in trending because of its cache diff --git a/packages/web/src/common/store/profile/sagas.js b/packages/web/src/common/store/profile/sagas.js index eb57acbf0dc..278a7ba0c85 100644 --- a/packages/web/src/common/store/profile/sagas.js +++ b/packages/web/src/common/store/profile/sagas.js @@ -154,13 +154,10 @@ function* confirmUpdateProfile(userId, metadata) { } yield waitForAccount() const currentUserId = yield call(queryCurrentUserId) - const { data = [] } = yield call( - [sdk.full.users, sdk.full.users.getUser], - { - id: Id.parse(userId), - userId: Id.parse(currentUserId) - } - ) + const { data = [] } = yield call([sdk.users, sdk.users.getUser], { + id: Id.parse(userId), + userId: Id.parse(currentUserId) + }) return userMetadataListFromSDK(data)[0] }, function* (confirmedUser) { diff --git a/packages/web/src/common/store/recommendation/sagas.ts b/packages/web/src/common/store/recommendation/sagas.ts index f19615f5787..a4ba8d9bd4c 100644 --- a/packages/web/src/common/store/recommendation/sagas.ts +++ b/packages/web/src/common/store/recommendation/sagas.ts @@ -19,15 +19,12 @@ export function* getRecommendedTracks( const sdk = yield* getSDK() - const { data } = yield* call( - [sdk.full.tracks, sdk.full.tracks.getRecommendedTracks], - { - genre, - exclusionList, - limit: remoteConfigInstance.getRemoteVar(IntKeys.AUTOPLAY_LIMIT) || 10, - userId: OptionalId.parse(currentUserId) - } - ) + const { data } = yield* call([sdk.tracks, sdk.tracks.getRecommendedTracks], { + genre, + exclusionList, + limit: remoteConfigInstance.getRemoteVar(IntKeys.AUTOPLAY_LIMIT) || 10, + userId: OptionalId.parse(currentUserId) + }) const tracks = transformAndCleanList(data, userTrackMetadataFromSDK) yield* call(primeTrackDataSaga, tracks) return tracks diff --git a/packages/web/src/common/store/search-ai-bar/sagas.ts b/packages/web/src/common/store/search-ai-bar/sagas.ts index 18ed60c93a6..ea4aa74f1bb 100644 --- a/packages/web/src/common/store/search-ai-bar/sagas.ts +++ b/packages/web/src/common/store/search-ai-bar/sagas.ts @@ -20,16 +20,13 @@ function* getSearchResults(searchText: string) { const sdk = yield* getSDK() const userId = yield* call(queryCurrentUserId) - const { data } = yield* call( - [sdk.full.search, sdk.full.search.searchAutocomplete], - { - userId: OptionalId.parse(userId), - query: searchText, - limit: 10, - offset: 0, - kind: SearchKind.USERS - } - ) + const { data } = yield* call([sdk.search, sdk.search.searchAutocomplete], { + userId: OptionalId.parse(userId), + query: searchText, + limit: 10, + offset: 0, + kind: SearchKind.USERS + }) const results = limitAutocompleteResults(searchResultsFromSDK(data)) const { users } = results diff --git a/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx b/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx index 7ff89573bba..32adec70b52 100644 --- a/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx +++ b/packages/web/src/components/buy-sell-modal/BuySellFlow.tsx @@ -416,8 +416,8 @@ export const BuySellFlow = (props: BuySellFlowProps) => { ) const pricePerBaseToken = useMemo(() => { return outputCoin?.price - ? outputCoin?.price - : (outputCoin?.dynamicBondingCurve.priceUSD ?? 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/UserGeneratedText.tsx b/packages/web/src/components/user-generated-text/UserGeneratedText.tsx index eeecf185c0f..ec3948ec187 100644 --- a/packages/web/src/components/user-generated-text/UserGeneratedText.tsx +++ b/packages/web/src/components/user-generated-text/UserGeneratedText.tsx @@ -69,7 +69,8 @@ const RenderLink = ({ attributes, content }: IntermediateRepresentation) => { } else if (instanceOfPlaylistResponse(res)) { setUnfurledContent(formatCollectionName({ collection: res.data[0] })) } else if (instanceOfUserResponse(res)) { - setUnfurledContent(formatUserName({ user: res.data })) + const user = Array.isArray(res.data) ? res.data[0] : res.data + if (user) setUnfurledContent(formatUserName({ user })) } } } 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/pages/artist-coins-launchpad-page/components/ArtistCoinsTable.tsx b/packages/web/src/pages/artist-coins-launchpad-page/components/ArtistCoinsTable.tsx index 08c9a7a2b8e..8b1170a5450 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,9 @@ 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 ?? 0) + : (coin.price ?? 0) return ( {formatCurrencyWithSubscript(price)} @@ -147,7 +149,7 @@ const renderMarketCapCell = (cellInfo: CoinCell) => { return ( {walletMessages.dollarSign} - {formatCount(Math.round(coin.marketCap))} + {formatCount(Math.round(coin.marketCap ?? 0))} ) } @@ -157,7 +159,7 @@ const renderTotalVolumeUSDCell = (cellInfo: CoinCell) => { return ( {walletMessages.dollarSign} - {formatCount(coin.totalVolumeUSD, 2)} + {formatCount(coin.totalVolumeUSD ?? 0, 2)} ) } @@ -166,7 +168,7 @@ const renderHoldersCell = (cellInfo: CoinCell) => { const coin = cellInfo.row.original return ( - {formatCount(coin.holder)} + {formatCount(coin.holder ?? 0)} ) } diff --git a/packages/web/src/pages/dashboard-page/store/sagas.ts b/packages/web/src/pages/dashboard-page/store/sagas.ts index c713e802513..33ccb8daf77 100644 --- a/packages/web/src/pages/dashboard-page/store/sagas.ts +++ b/packages/web/src/pages/dashboard-page/store/sagas.ts @@ -81,23 +81,23 @@ function* fetchDashboardAsync( limit, getUnlisted: true }), - call([sdk.full.users, sdk.full.users.getPlaylistsByUser], { + call([sdk.users, sdk.users.getPlaylistsByUser], { id: Id.parse(accountUserId), userId: OptionalId.parse(accountUserId) }), - call([sdk.full.users, sdk.full.users.getAlbumsByUser], { + call([sdk.users, sdk.users.getAlbumsByUser], { id: Id.parse(accountUserId), userId: OptionalId.parse(accountUserId) }) ]) const tracks = data[0] as Track[] const playlists = transformAndCleanList( - (data[1] as Awaited>) + (data[1] as Awaited>) .data, userCollectionMetadataFromSDK ) const albums = transformAndCleanList( - (data[2] as Awaited>) + (data[2] as Awaited>) .data, userCollectionMetadataFromSDK ) diff --git a/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx b/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx index 8ce48501068..2dcb9298bb9 100644 --- a/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx +++ b/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx @@ -199,7 +199,7 @@ export const OAuthLoginPage = () => { ) const sdk = await audiusSdk() - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet: signInResponse.walletAddress }) if (!data) { diff --git a/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx b/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx index 3a977e42af1..8ddb877d680 100644 --- a/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx +++ b/packages/web/src/pages/oauth-login-page/OAuthSignUpPage.tsx @@ -140,7 +140,7 @@ export const OAuthSignUpPage = () => { const maxRetries = 15 while (retries < maxRetries) { try { - const response = await sdk.full.users.getUserAccount({ + const response = await sdk.users.getUserAccount({ wallet }) if (response.data) { diff --git a/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts b/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts index 53f54a57955..b9baa40eee3 100644 --- a/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts +++ b/packages/web/src/pages/sign-up-page/components/useExternalWalletAuth.ts @@ -14,7 +14,7 @@ import { appkitModal, audiusChain } from 'app/ReownAppKitModal' */ export const doesUserExist = async (sdk: AudiusSdk, wallet: string) => { try { - const { data } = await sdk.full.users.getUserAccount({ + const { data } = await sdk.users.getUserAccount({ wallet }) if (data?.user) { diff --git a/packages/web/src/public-site/pages/landing-page/components/FeaturedContent.tsx b/packages/web/src/public-site/pages/landing-page/components/FeaturedContent.tsx index 2c29aaf12aa..f7dd661f127 100644 --- a/packages/web/src/public-site/pages/landing-page/components/FeaturedContent.tsx +++ b/packages/web/src/public-site/pages/landing-page/components/FeaturedContent.tsx @@ -112,7 +112,7 @@ const FeaturedContent = (props: FeaturedContentProps) => { .slice(0, 4) .map((id: string) => Id.parse(parseInt(id))) const sdk = await audiusSdk() - const { data } = await sdk.full.playlists.getBulkPlaylists({ + const { data } = await sdk.playlists.getBulkPlaylists({ id: featuredPlaylistIds }) return transformAndCleanList(data, userCollectionMetadataFromSDK)