From 7f2e36013cfd9e78d59f2ab5eab4c4055091e99e Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Wed, 18 Feb 2026 17:08:15 -0800 Subject: [PATCH 1/3] Use new format in stream/download conditions for usdc_purchase --- .../src/adapters/accessConditionsFromSDK.ts | 34 +++----- .../src/adapters/accessConditionsToSDK.ts | 2 +- .../tan-query/upload/usePublishCollection.ts | 19 ++--- .../api/tan-query/upload/usePublishTracks.ts | 36 +++----- packages/common/src/models/Track.ts | 6 +- .../src/schemas/upload/uploadFormSchema.ts | 6 +- .../default/.openapi-generator/FILES | 3 + .../generated/default/models/AccessGate.ts | 24 +++--- .../generated/default/models/PaymentSplit.ts | 76 +++++++++++++++++ .../generated/default/models/PurchaseGate.ts | 74 +++++++++++++++++ .../api/generated/default/models/UsdcGate.ts | 83 +++++++++++++++++++ .../sdk/api/generated/default/models/index.ts | 3 + packages/sdk/src/sdk/api/tracks/types.ts | 6 +- .../src/common/store/upload/sagaHelpers.ts | 16 +--- 14 files changed, 290 insertions(+), 98 deletions(-) create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PaymentSplit.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/PurchaseGate.ts create mode 100644 packages/sdk/src/sdk/api/generated/default/models/UsdcGate.ts diff --git a/packages/common/src/adapters/accessConditionsFromSDK.ts b/packages/common/src/adapters/accessConditionsFromSDK.ts index 5b9b976416b..643716202ba 100644 --- a/packages/common/src/adapters/accessConditionsFromSDK.ts +++ b/packages/common/src/adapters/accessConditionsFromSDK.ts @@ -1,7 +1,7 @@ import type { AccessGate, full } from '@audius/sdk' import { - instanceOfExtendedPurchaseGate, instanceOfFollowGate, + instanceOfPurchaseGate, instanceOfTokenGate } from '@audius/sdk' @@ -13,26 +13,6 @@ export const accessConditionsFromSDK = ( ): AccessConditions | null => { if (instanceOfFollowGate(input)) { return { follow_user_id: input.followUserId } - } else if (instanceOfExtendedPurchaseGate(input)) { - const purchase = input.usdcPurchase - const splits = Array.isArray(purchase.splits) - ? purchase.splits.map((s) => ({ - user_id: s.userId, - percentage: s.percentage, - payout_wallet: s.payoutWallet, - amount: s.amount, - ...(s.ethWallet != null && { eth_wallet: s.ethWallet }) - })) - : [] - const albumTrackPrice = (purchase as { albumTrackPrice?: number }) - .albumTrackPrice - return { - usdc_purchase: { - price: purchase.price, - ...(albumTrackPrice != null && { albumTrackPrice }), - splits - } - } } else if (instanceOfTokenGate(input)) { return { token_gate: { @@ -40,8 +20,16 @@ export const accessConditionsFromSDK = ( token_amount: input.tokenGate.tokenAmount } } - } else if ('nftCollection' in input && input.nftCollection != null) { - return null + } else if (instanceOfPurchaseGate(input)) { + return { + usdc_purchase: { + price: input.usdcPurchase.price, + splits: input.usdcPurchase.splits.map((s) => ({ + user_id: s.userId, + percentage: s.percentage + })) + } + } } else { throw new Error(`Unsupported access gate type: ${JSON.stringify(input)}`) } diff --git a/packages/common/src/adapters/accessConditionsToSDK.ts b/packages/common/src/adapters/accessConditionsToSDK.ts index 936001bde3a..9fdabb7a9bf 100644 --- a/packages/common/src/adapters/accessConditionsToSDK.ts +++ b/packages/common/src/adapters/accessConditionsToSDK.ts @@ -28,7 +28,7 @@ export const usdcPurchaseConditionsToSDK = ( ethWallet?: string } ) => ({ - userId: s.user_id ?? s.userId, + userId: s.user_id, percentage: s.percentage, payoutWallet: s.payout_wallet ?? s.payoutWallet ?? '', amount: s.amount, diff --git a/packages/common/src/api/tan-query/upload/usePublishCollection.ts b/packages/common/src/api/tan-query/upload/usePublishCollection.ts index a3d63e98ad3..338d56a142a 100644 --- a/packages/common/src/api/tan-query/upload/usePublishCollection.ts +++ b/packages/common/src/api/tan-query/upload/usePublishCollection.ts @@ -36,7 +36,6 @@ type PublishCollectionContext = Pick< 'audiusSdk' | 'analytics' | 'dispatch' | 'reportToSentry' > & { userId: number - wallet: string } type PublishCollectionParams = { @@ -52,15 +51,11 @@ type PublishCollectionParams = { const getPublishCollectionOptions = (context: PublishCollectionContext) => mutationOptions({ mutationFn: async (params: PublishCollectionParams) => { - const { audiusSdk, userId, wallet } = context + const { audiusSdk, userId } = context const sdk = await audiusSdk() - if (!userId || !wallet) { + if (!userId) { throw new Error('User ID and wallet are required to publish collection') } - const userBank = await sdk.services.claimableTokensClient.deriveUserBank({ - ethWallet: wallet, - mint: 'USDC' - }) // If the collection is a premium album, this will populate the premium metadata (price/splits/etc) let albumTrackPrice: number | undefined @@ -73,7 +68,7 @@ const getPublishCollectionOptions = (context: PublishCollectionContext) => params.collectionMetadata.stream_conditions?.usdc_purchase .albumTrackPrice ?? undefined params.collectionMetadata.stream_conditions = getUSDCMetadata( - userBank.toString(), + userId, params.collectionMetadata.stream_conditions ) } @@ -81,7 +76,7 @@ const getPublishCollectionOptions = (context: PublishCollectionContext) => // Combine collection metadata into each track's metadata for (const track of params.tracks) { track.metadata = combineMetadata( - userBank.toString(), + userId, track.metadata, params.collectionMetadata, albumTrackPrice @@ -143,14 +138,12 @@ export const usePublishCollection = ( const { data: account = null } = useCurrentAccount() const { data: accountUser } = useCurrentAccountUser() const userId = account?.userId ?? undefined - const wallet = account?.walletAddresses.currentUser ?? undefined return useMutation({ ...options, ...getPublishCollectionOptions({ audiusSdk, userId: userId!, - wallet: wallet!, dispatch, analytics, reportToSentry @@ -212,7 +205,7 @@ export const usePublishCollection = ( * taking the metadata from the playlist when the track is missing it. */ function combineMetadata( - userBank: string, + userId: number, trackMetadata: TrackMetadataForUpload, collectionMetadata: CollectionValues, albumTrackPrice?: number @@ -267,7 +260,7 @@ function combineMetadata( usdc_purchase: { price: albumTrackPrice, splits: [] } } // Add splits to stream & download conditions - addPremiumMetadata(userBank, metadata) + addPremiumMetadata(userId, metadata) } return metadata } diff --git a/packages/common/src/api/tan-query/upload/usePublishTracks.ts b/packages/common/src/api/tan-query/upload/usePublishTracks.ts index 77b1a634e42..11b55975092 100644 --- a/packages/common/src/api/tan-query/upload/usePublishTracks.ts +++ b/packages/common/src/api/tan-query/upload/usePublishTracks.ts @@ -1,4 +1,3 @@ -import { USDC } from '@audius/fixed-decimal' import { HashId, Id, type UploadResponse } from '@audius/sdk' import { useMutation, useQueryClient } from '@tanstack/react-query' @@ -29,7 +28,6 @@ type PublishTracksContext = Pick< 'audiusSdk' | 'analytics' | 'dispatch' | 'reportToSentry' > & { userId: number - wallet: string kind?: 'tracks' | 'album' | 'playlist' } @@ -47,7 +45,6 @@ export const publishTracks = async ( ) => { const { userId, - wallet, kind, audiusSdk, dispatch, @@ -55,21 +52,15 @@ export const publishTracks = async ( analytics: { make, track } } = context - if (!context.userId || !context.wallet) { + if (!context.userId) { throw new Error('User ID and wallet are required to publish tracks') } const sdk = await audiusSdk() - const userBank = await sdk.services.claimableTokensClient.deriveUserBank({ - ethWallet: wallet, - mint: 'USDC' - }) + return await Promise.all( params.map(async (param) => { - const snakeMetadata = addPremiumMetadata( - userBank.toString(), - param.metadata - ) + const snakeMetadata = addPremiumMetadata(userId, param.metadata) const trackId = await sdk.tracks.generateTrackId() const camelMetadata = trackMetadataForUploadToSdk({ @@ -191,7 +182,6 @@ export const usePublishTracks = ( const { data: account } = useCurrentAccount() const { data: accountUser } = useCurrentAccountUser() const userId = account?.userId ?? undefined - const wallet = account?.walletAddresses.currentUser ?? undefined const kind = options?.kind ?? 'tracks' return useMutation({ @@ -199,7 +189,6 @@ export const usePublishTracks = ( ...getPublishTracksOptions({ ...queryContext, userId: userId!, - wallet: wallet!, kind }), onSuccess: async (data) => { @@ -235,11 +224,10 @@ export const usePublishTracks = ( * returns updated conditions with price in WEI and splits in the new array format. */ export function getUSDCMetadata( - userBank: string, + userId: number, stream_conditions: USDCPurchaseConditions ): USDCPurchaseConditions { const priceCents = stream_conditions.usdc_purchase.price - const priceWei = Number(USDC(priceCents / 100).value.toString()) return { usdc_purchase: { price: priceCents, @@ -248,9 +236,8 @@ export function getUSDCMetadata( }), splits: [ { - payout_wallet: userBank?.toString() ?? '', - percentage: 100, - amount: priceWei + user_id: userId, + percentage: 100 } ] } @@ -262,24 +249,21 @@ export function getUSDCMetadata( * Converts prices to WEI and adds splits for USDC purchasable content. */ export function addPremiumMetadata( - userBank: string, + userId: number, track: T ) { // download_conditions could be set separately from stream_conditions, so we check for them first if (isContentUSDCPurchaseGated(track.download_conditions)) { track.download_conditions = getUSDCMetadata( - userBank, + userId, track.download_conditions ) } if (isContentUSDCPurchaseGated(track.stream_conditions)) { - track.stream_conditions = getUSDCMetadata(userBank, track.stream_conditions) + track.stream_conditions = getUSDCMetadata(userId, track.stream_conditions) // If stream_conditions are set, download_conditions should always match - track.download_conditions = getUSDCMetadata( - userBank, - track.stream_conditions - ) + track.download_conditions = getUSDCMetadata(userId, track.stream_conditions) } return track diff --git a/packages/common/src/models/Track.ts b/packages/common/src/models/Track.ts index 069f4fc53cf..f617b4810b8 100644 --- a/packages/common/src/models/Track.ts +++ b/packages/common/src/models/Track.ts @@ -66,10 +66,10 @@ export type NftGatedConditions = { /** Single split in USDC purchase conditions (matches API extended_payment_split). */ export type PaymentSplit = { - user_id?: number + user_id: number percentage: number - payout_wallet: string - amount: number + payout_wallet?: string + amount?: number eth_wallet?: string } diff --git a/packages/common/src/schemas/upload/uploadFormSchema.ts b/packages/common/src/schemas/upload/uploadFormSchema.ts index 3d52f6cd64d..3537e9e4534 100644 --- a/packages/common/src/schemas/upload/uploadFormSchema.ts +++ b/packages/common/src/schemas/upload/uploadFormSchema.ts @@ -37,10 +37,10 @@ const TokenGatedConditionsSchema = z /** Same as API extended_payment_split (snake-cased) */ const PaymentSplitSchema = z.object({ - user_id: z.optional(z.number()), + user_id: z.number(), percentage: z.number().min(0).max(100), - payout_wallet: z.string(), - amount: z.number().nonnegative(), + payout_wallet: z.string().optional(), + amount: z.number().nonnegative().optional(), eth_wallet: z.optional(z.string()) }) diff --git a/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES b/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES index 134ac6d39eb..d86a7b2f59f 100644 --- a/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES +++ b/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES @@ -123,6 +123,7 @@ models/MediaLink.ts models/MonthlyAggregatePlay.ts models/Mood.ts models/MutualFollowersResponse.ts +models/PaymentSplit.ts models/PinCommentRequestBody.ts models/Playlist.ts models/PlaylistAddedTimestamp.ts @@ -139,6 +140,7 @@ models/PrizeClaimResponse.ts models/PrizePublic.ts models/PrizesResponse.ts models/ProfilePicture.ts +models/PurchaseGate.ts models/PurchasersResponse.ts models/ReactCommentRequestBody.ts models/RedeemAmountResponse.ts @@ -205,6 +207,7 @@ models/UpdateDeveloperAppRequestBody.ts models/UpdatePlaylistRequestBody.ts models/UpdateTrackRequestBody.ts models/UpdateUserRequestBody.ts +models/UsdcGate.ts models/User.ts models/UserCoin.ts models/UserCoinAccount.ts diff --git a/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts b/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts index 283722cfa35..022e3e2b0bf 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts @@ -13,13 +13,6 @@ * Do not edit the class manually. */ -import { - ExtendedPurchaseGate, - instanceOfExtendedPurchaseGate, - ExtendedPurchaseGateFromJSON, - ExtendedPurchaseGateFromJSONTyped, - ExtendedPurchaseGateToJSON, -} from './ExtendedPurchaseGate'; import { FollowGate, instanceOfFollowGate, @@ -27,6 +20,13 @@ import { FollowGateFromJSONTyped, FollowGateToJSON, } from './FollowGate'; +import { + PurchaseGate, + instanceOfPurchaseGate, + PurchaseGateFromJSON, + PurchaseGateFromJSONTyped, + PurchaseGateToJSON, +} from './PurchaseGate'; import { TipGate, instanceOfTipGate, @@ -47,7 +47,7 @@ import { * * @export */ -export type AccessGate = ExtendedPurchaseGate | FollowGate | TipGate | TokenGate; +export type AccessGate = FollowGate | PurchaseGate | TipGate | TokenGate; export function AccessGateFromJSON(json: any): AccessGate { return AccessGateFromJSONTyped(json, false); @@ -57,7 +57,7 @@ export function AccessGateFromJSONTyped(json: any, ignoreDiscriminator: boolean) if ((json === undefined) || (json === null)) { return json; } - return { ...ExtendedPurchaseGateFromJSONTyped(json, true), ...FollowGateFromJSONTyped(json, true), ...TipGateFromJSONTyped(json, true), ...TokenGateFromJSONTyped(json, true) }; + return { ...FollowGateFromJSONTyped(json, true), ...PurchaseGateFromJSONTyped(json, true), ...TipGateFromJSONTyped(json, true), ...TokenGateFromJSONTyped(json, true) }; } export function AccessGateToJSON(value?: AccessGate | null): any { @@ -68,12 +68,12 @@ export function AccessGateToJSON(value?: AccessGate | null): any { return null; } - if (instanceOfExtendedPurchaseGate(value)) { - return ExtendedPurchaseGateToJSON(value as ExtendedPurchaseGate); - } if (instanceOfFollowGate(value)) { return FollowGateToJSON(value as FollowGate); } + if (instanceOfPurchaseGate(value)) { + return PurchaseGateToJSON(value as PurchaseGate); + } if (instanceOfTipGate(value)) { return TipGateToJSON(value as TipGate); } diff --git a/packages/sdk/src/sdk/api/generated/default/models/PaymentSplit.ts b/packages/sdk/src/sdk/api/generated/default/models/PaymentSplit.ts new file mode 100644 index 00000000000..5fb3f174be9 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/PaymentSplit.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 PaymentSplit + */ +export interface PaymentSplit { + /** + * + * @type {number} + * @memberof PaymentSplit + */ + userId: number; + /** + * + * @type {number} + * @memberof PaymentSplit + */ + percentage: number; +} + +/** + * Check if a given object implements the PaymentSplit interface. + */ +export function instanceOfPaymentSplit(value: object): value is PaymentSplit { + let isInstance = true; + isInstance = isInstance && "userId" in value && value["userId"] !== undefined; + isInstance = isInstance && "percentage" in value && value["percentage"] !== undefined; + + return isInstance; +} + +export function PaymentSplitFromJSON(json: any): PaymentSplit { + return PaymentSplitFromJSONTyped(json, false); +} + +export function PaymentSplitFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentSplit { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': json['user_id'], + 'percentage': json['percentage'], + }; +} + +export function PaymentSplitToJSON(value?: PaymentSplit | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'user_id': value.userId, + 'percentage': value.percentage, + }; +} + 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..246b91ee727 --- /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 in USDC 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/UsdcGate.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.ts new file mode 100644 index 00000000000..4333d7da359 --- /dev/null +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.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 { PaymentSplit } from './PaymentSplit'; +import { + PaymentSplitFromJSON, + PaymentSplitFromJSONTyped, + PaymentSplitToJSON, +} from './PaymentSplit'; + +/** + * + * @export + * @interface UsdcGate + */ +export interface UsdcGate { + /** + * The price in USDC needed to unlock + * @type {number} + * @memberof UsdcGate + */ + price: number; + /** + * + * @type {Array} + * @memberof UsdcGate + */ + splits: Array; +} + +/** + * Check if a given object implements the UsdcGate interface. + */ +export function instanceOfUsdcGate(value: object): value is UsdcGate { + let isInstance = true; + isInstance = isInstance && "price" in value && value["price"] !== undefined; + isInstance = isInstance && "splits" in value && value["splits"] !== 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 { + + 'price': json['price'], + 'splits': ((json['splits'] as Array).map(PaymentSplitFromJSON)), + }; +} + +export function UsdcGateToJSON(value?: UsdcGate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'price': value.price, + 'splits': ((value.splits as Array).map(PaymentSplitToJSON)), + }; +} + diff --git a/packages/sdk/src/sdk/api/generated/default/models/index.ts b/packages/sdk/src/sdk/api/generated/default/models/index.ts index 9f15f71149e..bbd92b2672b 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/index.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/index.ts @@ -107,6 +107,7 @@ export * from './MediaLink'; export * from './MonthlyAggregatePlay'; export * from './Mood'; export * from './MutualFollowersResponse'; +export * from './PaymentSplit'; export * from './PinCommentRequestBody'; export * from './Playlist'; export * from './PlaylistAddedTimestamp'; @@ -123,6 +124,7 @@ export * from './PrizeClaimResponse'; export * from './PrizePublic'; export * from './PrizesResponse'; export * from './ProfilePicture'; +export * from './PurchaseGate'; export * from './PurchasersResponse'; export * from './ReactCommentRequestBody'; export * from './RedeemAmountResponse'; @@ -189,6 +191,7 @@ export * from './UpdateDeveloperAppRequestBody'; export * from './UpdatePlaylistRequestBody'; export * from './UpdateTrackRequestBody'; export * from './UpdateUserRequestBody'; +export * from './UsdcGate'; export * from './User'; export * from './UserCoin'; export * from './UserCoinAccount'; diff --git a/packages/sdk/src/sdk/api/tracks/types.ts b/packages/sdk/src/sdk/api/tracks/types.ts index 94b0625765c..0778c39189f 100644 --- a/packages/sdk/src/sdk/api/tracks/types.ts +++ b/packages/sdk/src/sdk/api/tracks/types.ts @@ -84,10 +84,8 @@ export const USDCPurchaseConditions = z price: z.number().positive(), splits: z.array( z.object({ - userId: z.number().optional(), - percentage: z.number().min(0).max(100), - payoutWallet: z.string(), - amount: z.number().positive() + userId: z.number(), + percentage: z.number().min(0).max(100) }) ) }) diff --git a/packages/web/src/common/store/upload/sagaHelpers.ts b/packages/web/src/common/store/upload/sagaHelpers.ts index d3d9721b848..e946ba4ecc4 100644 --- a/packages/web/src/common/store/upload/sagaHelpers.ts +++ b/packages/web/src/common/store/upload/sagaHelpers.ts @@ -6,12 +6,7 @@ import { isContentUSDCPurchaseGated, USDCPurchaseConditions } from '@audius/common/models' -import { - getOrCreateUSDCUserBank, - TrackForUpload, - TrackMetadataForUpload -} from '@audius/common/store' -import { USDC } from '@audius/fixed-decimal' +import { TrackForUpload, TrackMetadataForUpload } from '@audius/common/store' import { all, call, put } from 'typed-redux-saga' import { make } from 'common/store/analytics/actions' @@ -97,11 +92,7 @@ export function* recordGatedTracks( export function* getUSDCMetadata(stream_conditions: USDCPurchaseConditions) { const ownerAccount = yield* call(queryAccountUser) - const wallet = ownerAccount?.erc_wallet ?? ownerAccount?.wallet - const ownerUserbank = yield* call(getOrCreateUSDCUserBank, wallet) const priceCents = stream_conditions.usdc_purchase.price - const priceWei = Number(USDC(priceCents / 100).value.toString()) - const payoutWallet = ownerUserbank?.toString() ?? '' const conditionsWithMetadata: USDCPurchaseConditions = { usdc_purchase: { price: priceCents, @@ -110,9 +101,8 @@ export function* getUSDCMetadata(stream_conditions: USDCPurchaseConditions) { }), splits: [ { - payout_wallet: payoutWallet, - percentage: 100, - amount: priceWei + user_id: ownerAccount!.user_id!, + percentage: 100 } ] } From 9b7934465cd9e4885c5e961d2c8a3aca650f8b73 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 19 Feb 2026 14:14:23 -0800 Subject: [PATCH 2/3] regen --- .../default/.openapi-generator/FILES | 4 +- .../generated/default/models/AccessGate.ts | 113 ++- .../generated/default/models/PurchaseGate.ts | 75 +- .../api/generated/default/models/UsdcGate.ts | 92 +- .../sdk/api/generated/default/models/index.ts | 790 +++++++++--------- 5 files changed, 531 insertions(+), 543 deletions(-) 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 31c75db0bb5..cfb055e06a1 100644 --- a/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES +++ b/packages/sdk/src/sdk/api/generated/default/.openapi-generator/FILES @@ -204,12 +204,12 @@ models/MilestoneNotificationActionData.ts models/MonthlyAggregatePlay.ts models/Mood.ts models/MutualFollowersResponse.ts -models/PaymentSplit.ts models/NftCollection.ts models/NftGate.ts models/Notification.ts models/Notifications.ts models/NotificationsResponse.ts +models/PaymentSplit.ts models/PinCommentRequestBody.ts models/Playlist.ts models/PlaylistAddedTimestamp.ts @@ -233,7 +233,6 @@ models/PrizeClaimResponse.ts models/PrizePublic.ts models/PrizesResponse.ts models/ProfilePicture.ts -models/PurchaseGate.ts models/Purchase.ts models/PurchaseGate.ts models/PurchaseSplit.ts @@ -381,7 +380,6 @@ models/UpdateDeveloperAppRequestBody.ts models/UpdatePlaylistRequestBody.ts models/UpdateTrackRequestBody.ts models/UpdateUserRequestBody.ts -models/UsdcGate.ts models/UpdateUserRequestBodyEvents.ts models/UrlWithMirrors.ts models/UsdcGate.ts diff --git a/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts b/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts index bc84823a429..022e3e2b0bf 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/AccessGate.ts @@ -6,7 +6,7 @@ * Audius V1 API * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,80 +14,73 @@ */ import { - FollowGate, - instanceOfFollowGate, - FollowGateFromJSON, - FollowGateFromJSONTyped, - FollowGateToJSON -} from './FollowGate' + FollowGate, + instanceOfFollowGate, + FollowGateFromJSON, + FollowGateFromJSONTyped, + FollowGateToJSON, +} from './FollowGate'; import { - PurchaseGate, - instanceOfPurchaseGate, - PurchaseGateFromJSON, - PurchaseGateFromJSONTyped, - PurchaseGateToJSON -} from './PurchaseGate' + PurchaseGate, + instanceOfPurchaseGate, + PurchaseGateFromJSON, + PurchaseGateFromJSONTyped, + PurchaseGateToJSON, +} from './PurchaseGate'; import { - TipGate, - instanceOfTipGate, - TipGateFromJSON, - TipGateFromJSONTyped, - TipGateToJSON -} from './TipGate' + TipGate, + instanceOfTipGate, + TipGateFromJSON, + TipGateFromJSONTyped, + TipGateToJSON, +} from './TipGate'; import { - TokenGate, - instanceOfTokenGate, - TokenGateFromJSON, - TokenGateFromJSONTyped, - TokenGateToJSON -} from './TokenGate' + TokenGate, + instanceOfTokenGate, + TokenGateFromJSON, + TokenGateFromJSONTyped, + TokenGateToJSON, +} from './TokenGate'; /** * @type AccessGate - * + * * @export */ -export type AccessGate = FollowGate | PurchaseGate | TipGate | TokenGate +export type AccessGate = FollowGate | PurchaseGate | TipGate | TokenGate; export function AccessGateFromJSON(json: any): AccessGate { - return AccessGateFromJSONTyped(json, false) + return AccessGateFromJSONTyped(json, false); } -export function AccessGateFromJSONTyped( - json: any, - ignoreDiscriminator: boolean -): AccessGate { - if (json === undefined || json === null) { - return json - } - return { - ...FollowGateFromJSONTyped(json, true), - ...PurchaseGateFromJSONTyped(json, true), - ...TipGateFromJSONTyped(json, true), - ...TokenGateFromJSONTyped(json, true) - } +export function AccessGateFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessGate { + if ((json === undefined) || (json === null)) { + return json; + } + return { ...FollowGateFromJSONTyped(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 (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } - if (instanceOfFollowGate(value)) { - return FollowGateToJSON(value as FollowGate) - } - if (instanceOfPurchaseGate(value)) { - return PurchaseGateToJSON(value as PurchaseGate) - } - if (instanceOfTipGate(value)) { - return TipGateToJSON(value as TipGate) - } - if (instanceOfTokenGate(value)) { - return TokenGateToJSON(value as TokenGate) - } + if (instanceOfFollowGate(value)) { + return FollowGateToJSON(value as FollowGate); + } + 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 {} + return {}; } + diff --git a/packages/sdk/src/sdk/api/generated/default/models/PurchaseGate.ts b/packages/sdk/src/sdk/api/generated/default/models/PurchaseGate.ts index 19dbe435813..42fb48b2cec 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/PurchaseGate.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/PurchaseGate.ts @@ -6,70 +6,69 @@ * Audius V1 API * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated 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 { exists, mapValues } from '../runtime'; +import type { UsdcGate } from './UsdcGate'; import { - UsdcGateFromJSON, - UsdcGateFromJSONTyped, - UsdcGateToJSON -} from './UsdcGate' + 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 + /** + * 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 + let isInstance = true; + isInstance = isInstance && "usdcPurchase" in value && value["usdcPurchase"] !== undefined; - return isInstance + return isInstance; } export function PurchaseGateFromJSON(json: any): PurchaseGate { - return PurchaseGateFromJSONTyped(json, false) + 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 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) - } + 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/UsdcGate.ts b/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.ts index 9051fe8f5c4..4333d7da359 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/UsdcGate.ts @@ -6,78 +6,78 @@ * Audius V1 API * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { exists, mapValues } from '../runtime' -import type { PaymentSplit } from './PaymentSplit' +import { exists, mapValues } from '../runtime'; +import type { PaymentSplit } from './PaymentSplit'; import { - PaymentSplitFromJSON, - PaymentSplitFromJSONTyped, - PaymentSplitToJSON -} from './PaymentSplit' + PaymentSplitFromJSON, + PaymentSplitFromJSONTyped, + PaymentSplitToJSON, +} from './PaymentSplit'; /** - * + * * @export * @interface UsdcGate */ export interface UsdcGate { - /** - * The price in USDC needed to unlock - * @type {number} - * @memberof UsdcGate - */ - price: number - /** - * - * @type {Array} - * @memberof UsdcGate - */ - splits: Array + /** + * The price in USDC needed to unlock + * @type {number} + * @memberof UsdcGate + */ + price: number; + /** + * + * @type {Array} + * @memberof UsdcGate + */ + splits: Array; } /** * Check if a given object implements the UsdcGate interface. */ export function instanceOfUsdcGate(value: object): value is UsdcGate { - let isInstance = true - isInstance = isInstance && 'price' in value && value['price'] !== undefined - isInstance = isInstance && 'splits' in value && value['splits'] !== undefined + let isInstance = true; + isInstance = isInstance && "price" in value && value["price"] !== undefined; + isInstance = isInstance && "splits" in value && value["splits"] !== undefined; - return isInstance + return isInstance; } export function UsdcGateFromJSON(json: any): UsdcGate { - return UsdcGateFromJSONTyped(json, false) + return UsdcGateFromJSONTyped(json, false); } -export function UsdcGateFromJSONTyped( - json: any, - ignoreDiscriminator: boolean -): UsdcGate { - if (json === undefined || json === null) { - return json - } - return { - price: json['price'], - splits: (json['splits'] as Array).map(PaymentSplitFromJSON) - } +export function UsdcGateFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcGate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'price': json['price'], + 'splits': ((json['splits'] as Array).map(PaymentSplitFromJSON)), + }; } export function UsdcGateToJSON(value?: UsdcGate | null): any { - if (value === undefined) { - return undefined - } - if (value === null) { - return null - } - return { - price: value.price, - splits: (value.splits as Array).map(PaymentSplitToJSON) - } + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'price': value.price, + 'splits': ((value.splits as Array).map(PaymentSplitToJSON)), + }; } + 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 417558ff885..9b774e08134 100644 --- a/packages/sdk/src/sdk/api/generated/default/models/index.ts +++ b/packages/sdk/src/sdk/api/generated/default/models/index.ts @@ -1,398 +1,396 @@ /* tslint:disable */ /* eslint-disable */ -export * from './Access' -export * from './AccessGate' -export * from './AccessInfoResponse' -export * from './Account' -export * from './AccountCollection' -export * from './AccountCollectionUser' -export * from './Activity' -export * from './AddManagerRequestBody' -export * from './AlbumBacklink' -export * from './AlbumsResponse' -export * from './AnnouncementNotification' -export * from './AnnouncementNotificationAction' -export * from './AnnouncementNotificationActionData' -export * from './ApproveGrantRequestBody' -export * from './ApproveManagerRequestNotification' -export * from './ApproveManagerRequestNotificationAction' -export * from './ApproveManagerRequestNotificationActionData' -export * from './ArtistCoinFees' -export * from './ArtistLocker' -export * from './ArtistRemixContestEndedNotification' -export * from './ArtistRemixContestEndedNotificationAction' -export * from './ArtistRemixContestEndedNotificationActionData' -export * from './ArtistRemixContestEndingSoonNotification' -export * from './ArtistRemixContestEndingSoonNotificationAction' -export * from './ArtistRemixContestEndingSoonNotificationActionData' -export * from './ArtistRemixContestSubmissionsNotification' -export * from './ArtistRemixContestSubmissionsNotificationAction' -export * from './ArtistRemixContestSubmissionsNotificationActionData' -export * from './Attestation' -export * from './AttestationReponse' -export * from './AuthorizedApp' -export * from './AuthorizedApps' -export * from './BalanceHistoryDataPoint' -export * from './BalanceHistoryResponse' -export * from './BestSellingItem' -export * from './BestSellingResponse' -export * from './BlobInfo' -export * from './BulkSubscribersResponse' -export * from './ChallengeResponse' -export * from './ChallengeRewardNotification' -export * from './ChallengeRewardNotificationAction' -export * from './ChallengeRewardNotificationActionData' -export * from './CidData' -export * from './CidDataResponse' -export * from './ClaimRewardsRequestBody' -export * from './ClaimRewardsResponse' -export * from './ClaimRewardsResponseDataInner' -export * from './ClaimableRewardNotification' -export * from './ClaimableRewardNotificationAction' -export * from './ClaimableRewardNotificationActionData' -export * from './ClaimedPrize' -export * from './ClaimedPrizesResponse' -export * from './Coin' -export * from './CoinInsights' -export * from './CoinInsightsDynamicBondingCurve' -export * from './CoinInsightsExtensions' -export * from './CoinInsightsResponse' -export * from './CoinMember' -export * from './CoinMembersCountResponse' -export * from './CoinMembersResponse' -export * from './CoinResponse' -export * from './CoinsResponse' -export * from './CoinsVolumeLeadersResponse' -export * from './CoinsVolumeLeadersResponseDataInner' -export * from './Collectibles' -export * from './CollectiblesResponse' -export * from './CollectionActivityWithoutTracks' -export * from './CollectionLibraryResponse' -export * from './Comment' -export * from './CommentEntityType' -export * from './CommentMention' -export * from './CommentMentionNotification' -export * from './CommentMentionNotificationAction' -export * from './CommentMentionNotificationActionData' -export * from './CommentNotification' -export * from './CommentNotificationAction' -export * from './CommentNotificationActionData' -export * from './CommentNotificationSetting' -export * from './CommentReactionNotification' -export * from './CommentReactionNotificationAction' -export * from './CommentReactionNotificationActionData' -export * from './CommentRepliesResponse' -export * from './CommentResponse' -export * from './CommentThreadNotification' -export * from './CommentThreadNotificationAction' -export * from './CommentThreadNotificationActionData' -export * from './ConnectedWallets' -export * from './ConnectedWalletsResponse' -export * from './CosignNotification' -export * from './CosignNotificationAction' -export * from './CosignNotificationActionData' -export * from './CoverArt' -export * from './CoverPhoto' -export * from './CreateAccessKeyResponse' -export * from './CreateCoinRequest' -export * from './CreateCoinResponse' -export * from './CreateCoinResponseData' -export * from './CreateCommentRequestBody' -export * from './CreateCommentResponse' -export * from './CreateDeveloperAppRequestBody' -export * from './CreateDeveloperAppResponse' -export * from './CreateGrantRequestBody' -export * from './CreateNotification' -export * from './CreateNotificationAction' -export * from './CreateNotificationActionData' -export * from './CreatePlaylistNotificationActionData' -export * from './CreatePlaylistRequestBody' -export * from './CreatePlaylistRequestBodyCopyrightLine' -export * from './CreatePlaylistRequestBodyProducerCopyrightLine' -export * from './CreatePlaylistResponse' -export * from './CreateRewardCodeRequest' -export * from './CreateRewardCodeResponse' -export * from './CreateTrackNotificationActionData' -export * from './CreateTrackRequestBody' -export * from './CreateTrackResponse' -export * from './CreateUserRequestBody' -export * from './CreateUserResponse' -export * from './DashboardWalletUser' -export * from './DashboardWalletUsersResponse' -export * from './DataAndType' -export * from './DdexCopyright' -export * from './DdexResourceContributor' -export * from './DdexRightsController' -export * from './DeactivateAccessKeyRequestBody' -export * from './DeactivateAccessKeyResponse' -export * from './DecodedUserToken' -export * from './DeveloperApp' -export * from './DeveloperAppResponse' -export * from './DeveloperAppsResponse' -export * from './DynamicBondingCurveInsights' -export * from './EmailAccess' -export * from './EmailAccessResponse' -export * from './Event' -export * from './EventsResponse' -export * from './ExtendedAccessGate' -export * from './ExtendedPaymentSplit' -export * from './ExtendedPurchaseGate' -export * from './ExtendedTokenGate' -export * from './ExtendedUsdcGate' -export * from './FanRemixContestEndedNotification' -export * from './FanRemixContestEndedNotificationAction' -export * from './FanRemixContestEndedNotificationActionData' -export * from './FanRemixContestEndingSoonNotification' -export * from './FanRemixContestEndingSoonNotificationAction' -export * from './FanRemixContestEndingSoonNotificationActionData' -export * from './FanRemixContestStartedNotification' -export * from './FanRemixContestStartedNotificationAction' -export * from './FanRemixContestStartedNotificationActionData' -export * from './FanRemixContestWinnersSelectedNotification' -export * from './FanRemixContestWinnersSelectedNotificationAction' -export * from './FanRemixContestWinnersSelectedNotificationActionData' -export * from './Favorite' -export * from './FavoriteRequestBody' -export * from './FavoritesResponse' -export * from './FieldVisibility' -export * from './FollowGate' -export * from './FollowNotification' -export * from './FollowNotificationAction' -export * from './FollowNotificationActionData' -export * from './FollowersResponse' -export * from './FollowingResponse' -export * from './Genre' -export * from './GetChallenges' -export * from './GetSupportedUsers' -export * from './GetSupporter' -export * from './GetSupporters' -export * from './GetSupporting' -export * from './GetTipsResponse' -export * from './Grant' -export * from './HistoryResponse' -export * from './ListenCount' -export * from './ListenStreakReminderNotification' -export * from './ListenStreakReminderNotificationAction' -export * from './ListenStreakReminderNotificationActionData' -export * from './ManagedUser' -export * from './ManagedUsersResponse' -export * from './ManagersResponse' -export * from './MilestoneNotification' -export * from './MilestoneNotificationAction' -export * from './MilestoneNotificationActionData' -export * from './MonthlyAggregatePlay' -export * from './Mood' -export * from './MutualFollowersResponse' -export * from './PaymentSplit' -export * from './NftCollection' -export * from './NftGate' -export * from './Notification' -export * from './Notifications' -export * from './NotificationsResponse' -export * from './PinCommentRequestBody' -export * from './Playlist' -export * from './PlaylistAddedTimestamp' -export * from './PlaylistArtwork' -export * from './PlaylistFeedItem' -export * from './PlaylistLibrary' -export * from './PlaylistLibraryExplorePlaylistIdentifier' -export * from './PlaylistLibraryFolder' -export * from './PlaylistLibraryPlaylistIdentifier' -export * from './PlaylistMilestoneNotificationActionData' -export * from './PlaylistResponse' -export * from './PlaylistSearchResult' -export * from './PlaylistTracksResponse' -export * from './PlaylistUpdate' -export * from './PlaylistUpdates' -export * from './PlaylistUpdatesResponse' -export * from './PlaylistWithoutTracks' -export * from './PlaylistsResponse' -export * from './PrizeClaimRequestBody' -export * from './PrizeClaimResponse' -export * from './PrizePublic' -export * from './PrizesResponse' -export * from './ProfilePicture' -export * from './PurchaseGate' -export * from './Purchase' -export * from './PurchaseGate' -export * from './PurchaseSplit' -export * from './PurchasersCountResponse' -export * from './PurchasersResponse' -export * from './PurchasesCountResponse' -export * from './PurchasesResponse' -export * from './ReactCommentRequestBody' -export * from './Reaction' -export * from './ReactionNotification' -export * from './ReactionNotificationAction' -export * from './ReactionNotificationActionData' -export * from './Reactions' -export * from './ReceiveTipNotification' -export * from './ReceiveTipNotificationAction' -export * from './ReceiveTipNotificationActionData' -export * from './RedeemAmountResponse' -export * from './Related' -export * from './RelatedArtistResponse' -export * from './Remix' -export * from './RemixNotification' -export * from './RemixNotificationAction' -export * from './RemixNotificationActionData' -export * from './RemixParent' -export * from './RemixParentWrite' -export * from './RemixablesResponse' -export * from './RemixedTrackAggregate' -export * from './RemixersCountResponse' -export * from './RemixersResponse' -export * from './RemixesResponse' -export * from './RemixingResponse' -export * from './ReplyComment' -export * from './Repost' -export * from './RepostNotification' -export * from './RepostNotificationAction' -export * from './RepostNotificationActionData' -export * from './RepostOfRepostNotification' -export * from './RepostOfRepostNotificationAction' -export * from './RepostOfRepostNotificationActionData' -export * from './RepostRequestBody' -export * from './Reposts' -export * from './RequestManagerNotification' -export * from './RequestManagerNotificationAction' -export * from './RequestManagerNotificationActionData' -export * from './RewardCodeErrorResponse' -export * from './RewardCodeResponse' -export * from './RewardPool' -export * from './SaleJson' -export * from './SalesAggregate' -export * from './SalesAggregateResponse' -export * from './SalesJsonContent' -export * from './SalesJsonResponse' -export * from './SaveNotification' -export * from './SaveNotificationAction' -export * from './SaveNotificationActionData' -export * from './SaveOfRepostNotification' -export * from './SaveOfRepostNotificationAction' -export * from './SaveOfRepostNotificationActionData' -export * from './SearchAutocompleteResponse' -export * from './SearchModel' -export * from './SearchPlaylist' -export * from './SearchResponse' -export * from './SearchTrack' -export * from './SendTipNotification' -export * from './SendTipNotificationAction' -export * from './SendTipNotificationActionData' -export * from './Stem' -export * from './StemParent' -export * from './StemsResponse' -export * from './StreamUrlResponse' -export * from './SubscribersResponse' -export * from './Supporter' -export * from './SupporterDethronedNotification' -export * from './SupporterDethronedNotificationAction' -export * from './SupporterDethronedNotificationActionData' -export * from './SupporterRankUpNotification' -export * from './SupporterRankUpNotificationAction' -export * from './SupporterRankUpNotificationActionData' -export * from './SupporterReference' -export * from './Supporting' -export * from './TagsResponse' -export * from './TastemakerNotification' -export * from './TastemakerNotificationAction' -export * from './TastemakerNotificationActionData' -export * from './TierChangeNotification' -export * from './TierChangeNotificationAction' -export * from './TierChangeNotificationActionData' -export * from './Tip' -export * from './TipGate' -export * from './TokenGate' -export * from './TopGenreUsersResponse' -export * from './TopListener' -export * from './TopUsersResponse' -export * from './Track' -export * from './TrackAccessInfo' -export * from './TrackActivity' -export * from './TrackAddedToPlaylistNotification' -export * from './TrackAddedToPlaylistNotificationAction' -export * from './TrackAddedToPlaylistNotificationActionData' -export * from './TrackAddedToPurchasedAlbumNotification' -export * from './TrackAddedToPurchasedAlbumNotificationAction' -export * from './TrackAddedToPurchasedAlbumNotificationActionData' -export * from './TrackArtwork' -export * from './TrackCommentCountResponse' -export * from './TrackCommentNotificationResponse' -export * from './TrackCommentsResponse' -export * from './TrackDownloadRequestBody' -export * from './TrackElementWrite' -export * from './TrackFavoritesResponse' -export * from './TrackFeedItem' -export * from './TrackId' -export * from './TrackInspect' -export * from './TrackInspectList' -export * from './TrackLibraryResponse' -export * from './TrackMilestoneNotificationActionData' -export * from './TrackRepostsResponse' -export * from './TrackResponse' -export * from './TrackSearch' -export * from './TrackSegment' -export * from './Tracks' -export * from './TracksCountResponse' -export * from './TracksResponse' -export * from './TransactionDetails' -export * from './TransactionHistoryCountResponse' -export * from './TransactionHistoryResponse' -export * from './TrendingIdsResponse' -export * from './TrendingNotification' -export * from './TrendingNotificationAction' -export * from './TrendingNotificationActionData' -export * from './TrendingPlaylistNotification' -export * from './TrendingPlaylistNotificationAction' -export * from './TrendingPlaylistNotificationActionData' -export * from './TrendingPlaylistsResponse' -export * from './TrendingTimesIds' -export * from './TrendingUndergroundNotification' -export * from './TrendingUndergroundNotificationAction' -export * from './TrendingUndergroundNotificationActionData' -export * from './UnclaimedIdResponse' -export * from './UndisbursedChallenge' -export * from './UndisbursedChallenges' -export * from './UpdateCoinRequest' -export * from './UpdateCoinResponse' -export * from './UpdateCommentRequestBody' -export * from './UpdateDeveloperAppRequestBody' -export * from './UpdatePlaylistRequestBody' -export * from './UpdateTrackRequestBody' -export * from './UpdateUserRequestBody' -export * from './UsdcGate' -export * from './UpdateUserRequestBodyEvents' -export * from './UrlWithMirrors' -export * from './UsdcGate' -export * from './UsdcPurchaseBuyerNotification' -export * from './UsdcPurchaseBuyerNotificationAction' -export * from './UsdcPurchaseBuyerNotificationActionData' -export * from './UsdcPurchaseSellerNotification' -export * from './UsdcPurchaseSellerNotificationAction' -export * from './UsdcPurchaseSellerNotificationActionData' -export * from './User' -export * from './UserAccountResponse' -export * from './UserArtistCoinBadge' -export * from './UserCoin' -export * from './UserCoinAccount' -export * from './UserCoinResponse' -export * from './UserCoinWithAccounts' -export * from './UserCoinsResponse' -export * from './UserCommentsResponse' -export * from './UserFeedItem' -export * from './UserFeedResponse' -export * from './UserIdAddress' -export * from './UserIdsAddressesResponse' -export * from './UserManager' -export * from './UserMilestoneNotificationActionData' -export * from './UserPlaylistLibrary' -export * from './UserPlaylistLibraryContentsInner' -export * from './UserResponse' -export * from './UserResponseSingle' -export * from './UserSearch' -export * from './UserSubscribers' -export * from './UserTrackListenCountsResponse' -export * from './UserTracksRemixedResponse' -export * from './VerifyToken' -export * from './VersionMetadata' -export * from './WriteResponse' +export * from './Access'; +export * from './AccessGate'; +export * from './AccessInfoResponse'; +export * from './Account'; +export * from './AccountCollection'; +export * from './AccountCollectionUser'; +export * from './Activity'; +export * from './AddManagerRequestBody'; +export * from './AlbumBacklink'; +export * from './AlbumsResponse'; +export * from './AnnouncementNotification'; +export * from './AnnouncementNotificationAction'; +export * from './AnnouncementNotificationActionData'; +export * from './ApproveGrantRequestBody'; +export * from './ApproveManagerRequestNotification'; +export * from './ApproveManagerRequestNotificationAction'; +export * from './ApproveManagerRequestNotificationActionData'; +export * from './ArtistCoinFees'; +export * from './ArtistLocker'; +export * from './ArtistRemixContestEndedNotification'; +export * from './ArtistRemixContestEndedNotificationAction'; +export * from './ArtistRemixContestEndedNotificationActionData'; +export * from './ArtistRemixContestEndingSoonNotification'; +export * from './ArtistRemixContestEndingSoonNotificationAction'; +export * from './ArtistRemixContestEndingSoonNotificationActionData'; +export * from './ArtistRemixContestSubmissionsNotification'; +export * from './ArtistRemixContestSubmissionsNotificationAction'; +export * from './ArtistRemixContestSubmissionsNotificationActionData'; +export * from './Attestation'; +export * from './AttestationReponse'; +export * from './AuthorizedApp'; +export * from './AuthorizedApps'; +export * from './BalanceHistoryDataPoint'; +export * from './BalanceHistoryResponse'; +export * from './BestSellingItem'; +export * from './BestSellingResponse'; +export * from './BlobInfo'; +export * from './BulkSubscribersResponse'; +export * from './ChallengeResponse'; +export * from './ChallengeRewardNotification'; +export * from './ChallengeRewardNotificationAction'; +export * from './ChallengeRewardNotificationActionData'; +export * from './CidData'; +export * from './CidDataResponse'; +export * from './ClaimRewardsRequestBody'; +export * from './ClaimRewardsResponse'; +export * from './ClaimRewardsResponseDataInner'; +export * from './ClaimableRewardNotification'; +export * from './ClaimableRewardNotificationAction'; +export * from './ClaimableRewardNotificationActionData'; +export * from './ClaimedPrize'; +export * from './ClaimedPrizesResponse'; +export * from './Coin'; +export * from './CoinInsights'; +export * from './CoinInsightsDynamicBondingCurve'; +export * from './CoinInsightsExtensions'; +export * from './CoinInsightsResponse'; +export * from './CoinMember'; +export * from './CoinMembersCountResponse'; +export * from './CoinMembersResponse'; +export * from './CoinResponse'; +export * from './CoinsResponse'; +export * from './CoinsVolumeLeadersResponse'; +export * from './CoinsVolumeLeadersResponseDataInner'; +export * from './Collectibles'; +export * from './CollectiblesResponse'; +export * from './CollectionActivityWithoutTracks'; +export * from './CollectionLibraryResponse'; +export * from './Comment'; +export * from './CommentEntityType'; +export * from './CommentMention'; +export * from './CommentMentionNotification'; +export * from './CommentMentionNotificationAction'; +export * from './CommentMentionNotificationActionData'; +export * from './CommentNotification'; +export * from './CommentNotificationAction'; +export * from './CommentNotificationActionData'; +export * from './CommentNotificationSetting'; +export * from './CommentReactionNotification'; +export * from './CommentReactionNotificationAction'; +export * from './CommentReactionNotificationActionData'; +export * from './CommentRepliesResponse'; +export * from './CommentResponse'; +export * from './CommentThreadNotification'; +export * from './CommentThreadNotificationAction'; +export * from './CommentThreadNotificationActionData'; +export * from './ConnectedWallets'; +export * from './ConnectedWalletsResponse'; +export * from './CosignNotification'; +export * from './CosignNotificationAction'; +export * from './CosignNotificationActionData'; +export * from './CoverArt'; +export * from './CoverPhoto'; +export * from './CreateAccessKeyResponse'; +export * from './CreateCoinRequest'; +export * from './CreateCoinResponse'; +export * from './CreateCoinResponseData'; +export * from './CreateCommentRequestBody'; +export * from './CreateCommentResponse'; +export * from './CreateDeveloperAppRequestBody'; +export * from './CreateDeveloperAppResponse'; +export * from './CreateGrantRequestBody'; +export * from './CreateNotification'; +export * from './CreateNotificationAction'; +export * from './CreateNotificationActionData'; +export * from './CreatePlaylistNotificationActionData'; +export * from './CreatePlaylistRequestBody'; +export * from './CreatePlaylistRequestBodyCopyrightLine'; +export * from './CreatePlaylistRequestBodyProducerCopyrightLine'; +export * from './CreatePlaylistResponse'; +export * from './CreateRewardCodeRequest'; +export * from './CreateRewardCodeResponse'; +export * from './CreateTrackNotificationActionData'; +export * from './CreateTrackRequestBody'; +export * from './CreateTrackResponse'; +export * from './CreateUserRequestBody'; +export * from './CreateUserResponse'; +export * from './DashboardWalletUser'; +export * from './DashboardWalletUsersResponse'; +export * from './DataAndType'; +export * from './DdexCopyright'; +export * from './DdexResourceContributor'; +export * from './DdexRightsController'; +export * from './DeactivateAccessKeyRequestBody'; +export * from './DeactivateAccessKeyResponse'; +export * from './DecodedUserToken'; +export * from './DeveloperApp'; +export * from './DeveloperAppResponse'; +export * from './DeveloperAppsResponse'; +export * from './DynamicBondingCurveInsights'; +export * from './EmailAccess'; +export * from './EmailAccessResponse'; +export * from './Event'; +export * from './EventsResponse'; +export * from './ExtendedAccessGate'; +export * from './ExtendedPaymentSplit'; +export * from './ExtendedPurchaseGate'; +export * from './ExtendedTokenGate'; +export * from './ExtendedUsdcGate'; +export * from './FanRemixContestEndedNotification'; +export * from './FanRemixContestEndedNotificationAction'; +export * from './FanRemixContestEndedNotificationActionData'; +export * from './FanRemixContestEndingSoonNotification'; +export * from './FanRemixContestEndingSoonNotificationAction'; +export * from './FanRemixContestEndingSoonNotificationActionData'; +export * from './FanRemixContestStartedNotification'; +export * from './FanRemixContestStartedNotificationAction'; +export * from './FanRemixContestStartedNotificationActionData'; +export * from './FanRemixContestWinnersSelectedNotification'; +export * from './FanRemixContestWinnersSelectedNotificationAction'; +export * from './FanRemixContestWinnersSelectedNotificationActionData'; +export * from './Favorite'; +export * from './FavoriteRequestBody'; +export * from './FavoritesResponse'; +export * from './FieldVisibility'; +export * from './FollowGate'; +export * from './FollowNotification'; +export * from './FollowNotificationAction'; +export * from './FollowNotificationActionData'; +export * from './FollowersResponse'; +export * from './FollowingResponse'; +export * from './Genre'; +export * from './GetChallenges'; +export * from './GetSupportedUsers'; +export * from './GetSupporter'; +export * from './GetSupporters'; +export * from './GetSupporting'; +export * from './GetTipsResponse'; +export * from './Grant'; +export * from './HistoryResponse'; +export * from './ListenCount'; +export * from './ListenStreakReminderNotification'; +export * from './ListenStreakReminderNotificationAction'; +export * from './ListenStreakReminderNotificationActionData'; +export * from './ManagedUser'; +export * from './ManagedUsersResponse'; +export * from './ManagersResponse'; +export * from './MilestoneNotification'; +export * from './MilestoneNotificationAction'; +export * from './MilestoneNotificationActionData'; +export * from './MonthlyAggregatePlay'; +export * from './Mood'; +export * from './MutualFollowersResponse'; +export * from './NftCollection'; +export * from './NftGate'; +export * from './Notification'; +export * from './Notifications'; +export * from './NotificationsResponse'; +export * from './PaymentSplit'; +export * from './PinCommentRequestBody'; +export * from './Playlist'; +export * from './PlaylistAddedTimestamp'; +export * from './PlaylistArtwork'; +export * from './PlaylistFeedItem'; +export * from './PlaylistLibrary'; +export * from './PlaylistLibraryExplorePlaylistIdentifier'; +export * from './PlaylistLibraryFolder'; +export * from './PlaylistLibraryPlaylistIdentifier'; +export * from './PlaylistMilestoneNotificationActionData'; +export * from './PlaylistResponse'; +export * from './PlaylistSearchResult'; +export * from './PlaylistTracksResponse'; +export * from './PlaylistUpdate'; +export * from './PlaylistUpdates'; +export * from './PlaylistUpdatesResponse'; +export * from './PlaylistWithoutTracks'; +export * from './PlaylistsResponse'; +export * from './PrizeClaimRequestBody'; +export * from './PrizeClaimResponse'; +export * from './PrizePublic'; +export * from './PrizesResponse'; +export * from './ProfilePicture'; +export * from './Purchase'; +export * from './PurchaseGate'; +export * from './PurchaseSplit'; +export * from './PurchasersCountResponse'; +export * from './PurchasersResponse'; +export * from './PurchasesCountResponse'; +export * from './PurchasesResponse'; +export * from './ReactCommentRequestBody'; +export * from './Reaction'; +export * from './ReactionNotification'; +export * from './ReactionNotificationAction'; +export * from './ReactionNotificationActionData'; +export * from './Reactions'; +export * from './ReceiveTipNotification'; +export * from './ReceiveTipNotificationAction'; +export * from './ReceiveTipNotificationActionData'; +export * from './RedeemAmountResponse'; +export * from './Related'; +export * from './RelatedArtistResponse'; +export * from './Remix'; +export * from './RemixNotification'; +export * from './RemixNotificationAction'; +export * from './RemixNotificationActionData'; +export * from './RemixParent'; +export * from './RemixParentWrite'; +export * from './RemixablesResponse'; +export * from './RemixedTrackAggregate'; +export * from './RemixersCountResponse'; +export * from './RemixersResponse'; +export * from './RemixesResponse'; +export * from './RemixingResponse'; +export * from './ReplyComment'; +export * from './Repost'; +export * from './RepostNotification'; +export * from './RepostNotificationAction'; +export * from './RepostNotificationActionData'; +export * from './RepostOfRepostNotification'; +export * from './RepostOfRepostNotificationAction'; +export * from './RepostOfRepostNotificationActionData'; +export * from './RepostRequestBody'; +export * from './Reposts'; +export * from './RequestManagerNotification'; +export * from './RequestManagerNotificationAction'; +export * from './RequestManagerNotificationActionData'; +export * from './RewardCodeErrorResponse'; +export * from './RewardCodeResponse'; +export * from './RewardPool'; +export * from './SaleJson'; +export * from './SalesAggregate'; +export * from './SalesAggregateResponse'; +export * from './SalesJsonContent'; +export * from './SalesJsonResponse'; +export * from './SaveNotification'; +export * from './SaveNotificationAction'; +export * from './SaveNotificationActionData'; +export * from './SaveOfRepostNotification'; +export * from './SaveOfRepostNotificationAction'; +export * from './SaveOfRepostNotificationActionData'; +export * from './SearchAutocompleteResponse'; +export * from './SearchModel'; +export * from './SearchPlaylist'; +export * from './SearchResponse'; +export * from './SearchTrack'; +export * from './SendTipNotification'; +export * from './SendTipNotificationAction'; +export * from './SendTipNotificationActionData'; +export * from './Stem'; +export * from './StemParent'; +export * from './StemsResponse'; +export * from './StreamUrlResponse'; +export * from './SubscribersResponse'; +export * from './Supporter'; +export * from './SupporterDethronedNotification'; +export * from './SupporterDethronedNotificationAction'; +export * from './SupporterDethronedNotificationActionData'; +export * from './SupporterRankUpNotification'; +export * from './SupporterRankUpNotificationAction'; +export * from './SupporterRankUpNotificationActionData'; +export * from './SupporterReference'; +export * from './Supporting'; +export * from './TagsResponse'; +export * from './TastemakerNotification'; +export * from './TastemakerNotificationAction'; +export * from './TastemakerNotificationActionData'; +export * from './TierChangeNotification'; +export * from './TierChangeNotificationAction'; +export * from './TierChangeNotificationActionData'; +export * from './Tip'; +export * from './TipGate'; +export * from './TokenGate'; +export * from './TopGenreUsersResponse'; +export * from './TopListener'; +export * from './TopUsersResponse'; +export * from './Track'; +export * from './TrackAccessInfo'; +export * from './TrackActivity'; +export * from './TrackAddedToPlaylistNotification'; +export * from './TrackAddedToPlaylistNotificationAction'; +export * from './TrackAddedToPlaylistNotificationActionData'; +export * from './TrackAddedToPurchasedAlbumNotification'; +export * from './TrackAddedToPurchasedAlbumNotificationAction'; +export * from './TrackAddedToPurchasedAlbumNotificationActionData'; +export * from './TrackArtwork'; +export * from './TrackCommentCountResponse'; +export * from './TrackCommentNotificationResponse'; +export * from './TrackCommentsResponse'; +export * from './TrackDownloadRequestBody'; +export * from './TrackElementWrite'; +export * from './TrackFavoritesResponse'; +export * from './TrackFeedItem'; +export * from './TrackId'; +export * from './TrackInspect'; +export * from './TrackInspectList'; +export * from './TrackLibraryResponse'; +export * from './TrackMilestoneNotificationActionData'; +export * from './TrackRepostsResponse'; +export * from './TrackResponse'; +export * from './TrackSearch'; +export * from './TrackSegment'; +export * from './Tracks'; +export * from './TracksCountResponse'; +export * from './TracksResponse'; +export * from './TransactionDetails'; +export * from './TransactionHistoryCountResponse'; +export * from './TransactionHistoryResponse'; +export * from './TrendingIdsResponse'; +export * from './TrendingNotification'; +export * from './TrendingNotificationAction'; +export * from './TrendingNotificationActionData'; +export * from './TrendingPlaylistNotification'; +export * from './TrendingPlaylistNotificationAction'; +export * from './TrendingPlaylistNotificationActionData'; +export * from './TrendingPlaylistsResponse'; +export * from './TrendingTimesIds'; +export * from './TrendingUndergroundNotification'; +export * from './TrendingUndergroundNotificationAction'; +export * from './TrendingUndergroundNotificationActionData'; +export * from './UnclaimedIdResponse'; +export * from './UndisbursedChallenge'; +export * from './UndisbursedChallenges'; +export * from './UpdateCoinRequest'; +export * from './UpdateCoinResponse'; +export * from './UpdateCommentRequestBody'; +export * from './UpdateDeveloperAppRequestBody'; +export * from './UpdatePlaylistRequestBody'; +export * from './UpdateTrackRequestBody'; +export * from './UpdateUserRequestBody'; +export * from './UpdateUserRequestBodyEvents'; +export * from './UrlWithMirrors'; +export * from './UsdcGate'; +export * from './UsdcPurchaseBuyerNotification'; +export * from './UsdcPurchaseBuyerNotificationAction'; +export * from './UsdcPurchaseBuyerNotificationActionData'; +export * from './UsdcPurchaseSellerNotification'; +export * from './UsdcPurchaseSellerNotificationAction'; +export * from './UsdcPurchaseSellerNotificationActionData'; +export * from './User'; +export * from './UserAccountResponse'; +export * from './UserArtistCoinBadge'; +export * from './UserCoin'; +export * from './UserCoinAccount'; +export * from './UserCoinResponse'; +export * from './UserCoinWithAccounts'; +export * from './UserCoinsResponse'; +export * from './UserCommentsResponse'; +export * from './UserFeedItem'; +export * from './UserFeedResponse'; +export * from './UserIdAddress'; +export * from './UserIdsAddressesResponse'; +export * from './UserManager'; +export * from './UserMilestoneNotificationActionData'; +export * from './UserPlaylistLibrary'; +export * from './UserPlaylistLibraryContentsInner'; +export * from './UserResponse'; +export * from './UserResponseSingle'; +export * from './UserSearch'; +export * from './UserSubscribers'; +export * from './UserTrackListenCountsResponse'; +export * from './UserTracksRemixedResponse'; +export * from './VerifyToken'; +export * from './VersionMetadata'; +export * from './WriteResponse'; From d1b70ec306889465a82eae5e38bab77d22f3352e Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 19 Feb 2026 14:19:08 -0800 Subject: [PATCH 3/3] owner ID is allowable now --- packages/sdk/src/sdk/api/tracks/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/sdk/src/sdk/api/tracks/types.ts b/packages/sdk/src/sdk/api/tracks/types.ts index c1e61e84622..94dae51d026 100644 --- a/packages/sdk/src/sdk/api/tracks/types.ts +++ b/packages/sdk/src/sdk/api/tracks/types.ts @@ -101,6 +101,7 @@ export const UploadStemMetadataSchema = z.object({ export const UploadTrackMetadataSchema = z.object({ trackId: z.optional(HashId), + ownerId: z.optional(z.number()), aiAttributionUserId: z.optional(HashId), description: z.optional(z.string().max(MAX_DESCRIPTION_LENGTH).nullable()), fieldVisibility: z.optional(