From 80f4f77e09616f29f6536426c2530bf4dae539bd Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:25:14 -0800 Subject: [PATCH 1/4] don't require user_id query param for POST /users --- api/swagger/swagger-v1.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 989a8847..7048cf3d 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -3446,13 +3446,6 @@ paths: security: - BasicAuth: [] - BearerAuth: [] - parameters: - - name: user_id - in: query - description: The user ID of the user making the request - required: true - schema: - type: string requestBody: x-codegen-request-body-name: metadata required: true From 049c03033329f76316c3b1b690dd751e2280b03f Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:29:00 -0800 Subject: [PATCH 2/4] add user events --- api/swagger/swagger-v1.yaml | 22 ++++++++++++++++++++++ api/v1_users.go | 7 +++++++ 2 files changed, 29 insertions(+) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 7048cf3d..54ee2680 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -10161,6 +10161,17 @@ components: spl_usdc_payout_wallet: type: string description: Solana USDC payout wallet address + events: + type: object + description: User events for tracking referrals and mobile users + properties: + referrer: + type: integer + description: User ID of the referrer + minimum: 1 + is_mobile_user: + type: boolean + description: Whether the user is on mobile update_user_request_body: type: object description: Request body for updating user profile. All fields are optional. @@ -10223,6 +10234,17 @@ components: coin_flair_mint: type: string description: Coin flair mint address + events: + type: object + description: User events for tracking referrals and mobile users + properties: + referrer: + type: integer + description: User ID of the referrer + minimum: 1 + is_mobile_user: + type: boolean + description: Whether the user is on mobile update_comment_request_body: type: object required: diff --git a/api/v1_users.go b/api/v1_users.go index 26ce93eb..e9b51b18 100644 --- a/api/v1_users.go +++ b/api/v1_users.go @@ -26,6 +26,11 @@ type PlaylistLibrary struct { Contents []PlaylistLibraryItem `json:"contents" validate:"required,dive"` } +type Events struct { + Referrer *int `json:"referrer,omitempty" validate:"omitempty,min=1"` + IsMobileUser *bool `json:"is_mobile_user,omitempty"` +} + type CreateUserRequest struct { UserId *int `json:"user_id,omitempty" validate:"omitempty,min=1"` Handle string `json:"handle" validate:"required,min=1"` @@ -45,6 +50,7 @@ type CreateUserRequest struct { ProfileType *string `json:"profile_type,omitempty" validate:"omitempty,oneof=label"` AllowAiAttribution *bool `json:"allow_ai_attribution,omitempty"` SplUsdcPayoutWallet *string `json:"spl_usdc_payout_wallet,omitempty"` + Events *Events `json:"events,omitempty"` } type UpdateUserRequest struct { @@ -67,6 +73,7 @@ type UpdateUserRequest struct { PlaylistLibrary *PlaylistLibrary `json:"playlist_library,omitempty" validate:"omitempty"` SplUsdcPayoutWallet *string `json:"spl_usdc_payout_wallet,omitempty"` CoinFlairMint *string `json:"coin_flair_mint,omitempty"` + Events *Events `json:"events,omitempty"` } // v1Users is a handler that retrieves full user data From f3d6354acb63efab9a54ec3302aa111120c14450 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:46:50 -0800 Subject: [PATCH 3/4] fix playlist library --- api/swagger/swagger-v1.yaml | 103 +++++++++++++++++++++++++++++++++++- api/v1_users.go | 50 +++++++++-------- 2 files changed, 126 insertions(+), 27 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 54ee2680..8f6d5b33 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -10161,6 +10161,56 @@ components: spl_usdc_payout_wallet: type: string description: Solana USDC payout wallet address + playlist_library: + type: object + description: User's playlist library with support for folders and playlists + properties: + contents: + type: array + description: Array of folders and playlist identifiers + items: + oneOf: + - type: object + description: Folder containing nested playlists and folders + required: + - id + - type + - name + - contents + properties: + id: + type: string + type: + type: string + enum: [folder] + name: + type: string + contents: + type: array + items: {} + - type: object + description: Playlist identifier + required: + - type + - playlist_id + properties: + type: + type: string + enum: [playlist] + playlist_id: + type: integer + minimum: 1 + - type: object + description: Explore playlist identifier + required: + - type + - playlist_id + properties: + type: + type: string + enum: [explore_playlist] + playlist_id: + type: string events: type: object description: User events for tracking referrals and mobile users @@ -10223,8 +10273,9 @@ components: type: boolean description: Whether the user is deactivated artist_pick_track_id: - type: string + type: integer description: Track ID to feature as artist pick + minimum: 1 allow_ai_attribution: type: boolean description: Whether to allow AI attribution @@ -10234,6 +10285,56 @@ components: coin_flair_mint: type: string description: Coin flair mint address + playlist_library: + type: object + description: User's playlist library with support for folders and playlists + properties: + contents: + type: array + description: Array of folders and playlist identifiers + items: + oneOf: + - type: object + description: Folder containing nested playlists and folders + required: + - id + - type + - name + - contents + properties: + id: + type: string + type: + type: string + enum: [folder] + name: + type: string + contents: + type: array + items: {} + - type: object + description: Playlist identifier + required: + - type + - playlist_id + properties: + type: + type: string + enum: [playlist] + playlist_id: + type: integer + minimum: 1 + - type: object + description: Explore playlist identifier + required: + - type + - playlist_id + properties: + type: + type: string + enum: [explore_playlist] + playlist_id: + type: string events: type: object description: User events for tracking referrals and mobile users diff --git a/api/v1_users.go b/api/v1_users.go index e9b51b18..babc5850 100644 --- a/api/v1_users.go +++ b/api/v1_users.go @@ -16,14 +16,11 @@ import ( ) // PlaylistLibraryItem represents an item in the user's playlist library -type PlaylistLibraryItem struct { - Type string `json:"type" validate:"required,oneof=playlist album explore_playlist temp_playlist"` - PlaylistId *string `json:"playlist_id,omitempty"` - ContentListId *string `json:"content_list_id,omitempty"` -} +// PlaylistLibraryItem can be either a folder or a playlist identifier +type PlaylistLibraryItem map[string]interface{} type PlaylistLibrary struct { - Contents []PlaylistLibraryItem `json:"contents" validate:"required,dive"` + Contents []PlaylistLibraryItem `json:"contents" validate:"required"` } type Events struct { @@ -32,25 +29,26 @@ type Events struct { } type CreateUserRequest struct { - UserId *int `json:"user_id,omitempty" validate:"omitempty,min=1"` - Handle string `json:"handle" validate:"required,min=1"` - Wallet string `json:"wallet" validate:"required"` - Name *string `json:"name,omitempty" validate:"omitempty,min=1"` - Bio *string `json:"bio,omitempty" validate:"omitempty,max=256"` - Location *string `json:"location,omitempty"` - Website *string `json:"website,omitempty" validate:"omitempty,url"` - Donation *string `json:"donation,omitempty"` - TwitterHandle *string `json:"twitter_handle,omitempty"` - InstagramHandle *string `json:"instagram_handle,omitempty"` - TiktokHandle *string `json:"tiktok_handle,omitempty"` - ProfilePicture *string `json:"profile_picture,omitempty"` - ProfilePictureSizes *string `json:"profile_picture_sizes,omitempty"` - CoverPhoto *string `json:"cover_photo,omitempty"` - CoverPhotoSizes *string `json:"cover_photo_sizes,omitempty"` - ProfileType *string `json:"profile_type,omitempty" validate:"omitempty,oneof=label"` - AllowAiAttribution *bool `json:"allow_ai_attribution,omitempty"` - SplUsdcPayoutWallet *string `json:"spl_usdc_payout_wallet,omitempty"` - Events *Events `json:"events,omitempty"` + UserId *int `json:"user_id,omitempty" validate:"omitempty,min=1"` + Handle string `json:"handle" validate:"required,min=1"` + Wallet string `json:"wallet" validate:"required"` + Name *string `json:"name,omitempty" validate:"omitempty,min=1"` + Bio *string `json:"bio,omitempty" validate:"omitempty,max=256"` + Location *string `json:"location,omitempty"` + Website *string `json:"website,omitempty" validate:"omitempty,url"` + Donation *string `json:"donation,omitempty"` + TwitterHandle *string `json:"twitter_handle,omitempty"` + InstagramHandle *string `json:"instagram_handle,omitempty"` + TiktokHandle *string `json:"tiktok_handle,omitempty"` + ProfilePicture *string `json:"profile_picture,omitempty"` + ProfilePictureSizes *string `json:"profile_picture_sizes,omitempty"` + CoverPhoto *string `json:"cover_photo,omitempty"` + CoverPhotoSizes *string `json:"cover_photo_sizes,omitempty"` + ProfileType *string `json:"profile_type,omitempty" validate:"omitempty,oneof=label"` + AllowAiAttribution *bool `json:"allow_ai_attribution,omitempty"` + SplUsdcPayoutWallet *string `json:"spl_usdc_payout_wallet,omitempty"` + PlaylistLibrary *PlaylistLibrary `json:"playlist_library,omitempty" validate:"omitempty"` + Events *Events `json:"events,omitempty"` } type UpdateUserRequest struct { @@ -68,7 +66,7 @@ type UpdateUserRequest struct { CoverPhotoSizes *string `json:"cover_photo_sizes,omitempty"` ProfileType *string `json:"profile_type,omitempty" validate:"omitempty,oneof=label"` IsDeactivated *bool `json:"is_deactivated,omitempty"` - ArtistPickTrackId *string `json:"artist_pick_track_id,omitempty"` + ArtistPickTrackId *int `json:"artist_pick_track_id,omitempty" validate:"omitempty,min=1"` AllowAiAttribution *bool `json:"allow_ai_attribution,omitempty"` PlaylistLibrary *PlaylistLibrary `json:"playlist_library,omitempty" validate:"omitempty"` SplUsdcPayoutWallet *string `json:"spl_usdc_payout_wallet,omitempty"` From 16bbf5fd3b50f5d5024f7d5bb57ae5b1bbe79152 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Fri, 13 Feb 2026 15:43:14 -0800 Subject: [PATCH 4/4] update playlist library types --- api/swagger/swagger-v1.yaml | 143 +++++++++++++++--------------------- 1 file changed, 61 insertions(+), 82 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 8f6d5b33..3dd77ea5 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -10164,53 +10164,17 @@ components: playlist_library: type: object description: User's playlist library with support for folders and playlists + required: + - contents properties: contents: type: array description: Array of folders and playlist identifiers items: oneOf: - - type: object - description: Folder containing nested playlists and folders - required: - - id - - type - - name - - contents - properties: - id: - type: string - type: - type: string - enum: [folder] - name: - type: string - contents: - type: array - items: {} - - type: object - description: Playlist identifier - required: - - type - - playlist_id - properties: - type: - type: string - enum: [playlist] - playlist_id: - type: integer - minimum: 1 - - type: object - description: Explore playlist identifier - required: - - type - - playlist_id - properties: - type: - type: string - enum: [explore_playlist] - playlist_id: - type: string + - $ref: '#/components/schemas/playlist_library_folder' + - $ref: '#/components/schemas/playlist_library_playlist_identifier' + - $ref: '#/components/schemas/playlist_library_explore_playlist_identifier' events: type: object description: User events for tracking referrals and mobile users @@ -10294,47 +10258,9 @@ components: description: Array of folders and playlist identifiers items: oneOf: - - type: object - description: Folder containing nested playlists and folders - required: - - id - - type - - name - - contents - properties: - id: - type: string - type: - type: string - enum: [folder] - name: - type: string - contents: - type: array - items: {} - - type: object - description: Playlist identifier - required: - - type - - playlist_id - properties: - type: - type: string - enum: [playlist] - playlist_id: - type: integer - minimum: 1 - - type: object - description: Explore playlist identifier - required: - - type - - playlist_id - properties: - type: - type: string - enum: [explore_playlist] - playlist_id: - type: string + - $ref: '#/components/schemas/playlist_library_folder' + - $ref: '#/components/schemas/playlist_library_playlist_identifier' + - $ref: '#/components/schemas/playlist_library_explore_playlist_identifier' events: type: object description: User events for tracking referrals and mobile users @@ -10551,6 +10477,59 @@ components: success: type: boolean description: Whether the deactivation was successful + playlist_library_folder: + type: object + description: Folder containing nested playlists and folders + required: + - id + - type + - name + - contents + properties: + id: + type: string + description: Unique folder identifier + type: + type: string + enum: [folder] + name: + type: string + description: Folder name + contents: + type: array + description: Nested folders and playlist identifiers + items: + oneOf: + - $ref: '#/components/schemas/playlist_library_folder' + - $ref: '#/components/schemas/playlist_library_playlist_identifier' + - $ref: '#/components/schemas/playlist_library_explore_playlist_identifier' + playlist_library_playlist_identifier: + type: object + description: Reference to a playlist + required: + - type + - playlist_id + properties: + type: + type: string + enum: [playlist] + playlist_id: + type: integer + description: Playlist ID + minimum: 1 + playlist_library_explore_playlist_identifier: + type: object + description: Reference to an explore playlist + required: + - type + - playlist_id + properties: + type: + type: string + enum: [explore_playlist] + playlist_id: + type: string + description: Explore playlist identifier comment_entity_type: type: string enum: