github.com/litesolutions/justifay-api@v1.0.0-2.0.20220707114139-46f28a909481/proto/user/user_messages.proto (about) 1 syntax="proto3"; 2 3 //package example; 4 //package resonate.api.user; 5 package user; 6 option go_package = "github.com/resonatecoop/user-api/proto/user"; 7 8 message UserRequest { 9 string id = 1; 10 } 11 12 message UserOptionalRequest { 13 optional string id = 1; 14 } 15 16 message ResetUserPasswordRequest { 17 string username = 1; 18 string password = 2; 19 } 20 21 message UserUpdateRequest { 22 string id = 1; // required 23 optional string username = 2; 24 optional string full_name = 3; 25 optional string first_name = 4; 26 optional string last_name = 5; 27 optional string country = 6; 28 optional bool newsletter_notification = 7; 29 optional int32 role_id = 8; 30 //repeated string followed_groups = 8; 31 //string email = 3; // required 32 //repeated string favorite_tracks = 11; 33 //repeated RelatedUserGroup owner_of_groups = 13; 34 //string display_name = 4; // required TODO remove 35 //bytes avatar = 9; 36 //repeated RelatedUserGroup owner_of_groups = 13; 37 //StreetAddress residence_address = 14; 38 } 39 40 message UserUpdateRestrictedRequest { 41 string id = 1; // required 42 optional string username = 2; 43 optional string full_name = 3; 44 optional string first_name = 4; 45 optional string last_name = 5; 46 optional bool member = 6; 47 optional int32 role_id = 7; 48 optional int32 tenant_id = 8; 49 optional bool newsletter_notification = 9; 50 //repeated string followed_groups = 10; TODO implement elsewhere! 51 //string email = 3; // required 52 //repeated string favorite_tracks = 11; 53 //repeated RelatedUserGroup owner_of_groups = 13; 54 //string display_name = 4; // required TODO remove 55 //bytes avatar = 9; 56 //repeated RelatedUserGroup owner_of_groups = 13; 57 //StreetAddress residence_address = 14; 58 } 59 60 message UserCreditResponse { 61 int64 total = 1; // required 62 } 63 64 message UserPrivateResponse { 65 string id = 1; // required 66 string username = 3; // required 67 string full_name = 4; // required 68 string first_name = 5; 69 string last_name = 6; 70 string country = 7; 71 bool email_confirmed = 8; 72 bool member = 9; 73 int32 role_id = 10; 74 int32 tenant_id = 11; 75 bool newsletter_notification = 12; 76 repeated string personas = 13; 77 repeated string owned_groups = 14; 78 repeated string followed_groups = 15; 79 //string email = 3; // required 80 //bytes avatar = 9; 81 //string display_name = 4; // required TODO remove 82 //repeated RelatedUserGroup owner_of_groups = 13; 83 //StreetAddress residence_address = 14; 84 } 85 86 message UserMembershipResponse { 87 string id = 1; 88 string start = 2; 89 string end = 3; 90 string membership_class = 4; 91 } 92 93 message UserPublicResponse { 94 string id = 1; 95 string username = 3; // required 96 string full_name = 4; // required 97 string first_name = 5; 98 string last_name = 6; 99 string country = 7; 100 bool member = 8; 101 repeated string personas = 9; 102 repeated string owned_groups = 10; 103 repeated string followed_groups = 11; 104 int32 role_id = 12; 105 //bytes avatar = 9; 106 //string display_name = 4; // required TODO remove 107 } 108 109 message UserAddRequest { 110 string username = 1; // required 111 string full_name = 2; // required 112 string first_name = 3; 113 string last_name = 4; 114 bool member = 5; 115 bool newsletter_notification = 6; 116 string country = 7; 117 repeated string followed_groups = 8; 118 optional int32 role_id = 9; 119 //string email = 2; // required 120 //repeated string favorite_tracks = 10; 121 //bytes avatar = 8; 122 //string display_name = 3; // required TODO remove 123 //repeated RelatedUserGroup owner_of_groups = 12; 124 //StreetAddress residence_address = 13; 125 } 126 127 message UserListResponse { 128 repeated UserPrivateResponse user = 1; 129 } 130 131 // message User { 132 // string id = 1; 133 // } 134 135 // syntax = "proto3"; 136 137 138 // option go_package = "user"; 139 140 // import "user-api/rpc/track/service.proto"; 141 142 143 // service UserService { 144 // rpc AddUser(User) returns (User); 145 // rpc GetUser(User) returns (User); 146 // rpc UpdateUser(User) returns (Empty); 147 // rpc DeleteUser(User) returns (Empty); 148 // rpc FollowGroup(UserToUserGroup) returns (Empty); 149 // rpc UnfollowGroup(UserToUserGroup) returns (Empty); 150 // // rpc AddFavoriteTrack(UserToTrack) returns (Empty); 151 // // rpc RemoveFavoriteTrack(UserToTrack) returns (Empty); 152 153 // // User Library 154 // // rpc GetPlaylists(User) returns (Playlists); 155 // // rpc GetFavoriteTracks(User) returns (Tracks); 156 // // rpc GetOwnedTracks(User) returns (Tracks); 157 // // rpc GetTrackHistory(User) returns (Tracks); 158 159 // // rpc GetSupportedArtists(User) returns (Artists); 160 // // rpc CreatePlay(CreatePlayRequest) returns (CreatePlayResponse); Payment API 161 // } 162 163 164 // message Playlists { 165 // repeated RelatedTrackGroup playlists = 1; 166 // } 167 168 // message Tracks { 169 // repeated Track tracks = 1; 170 // } 171 172 173 174 // message Artists { 175 // repeated RelatedUserGroup artists = 1; 176 // } 177 178 // Used for: 179 // - following/unfollowing group 180 // message UserToUserGroup { 181 // string user_id = 1; // required 182 // string user_group_id = 2; // required 183 // } 184 185 // Used for: 186 // - adding/removing favorite tracks 187 // message UserToTrack { 188 // string user_id = 1; // required 189 // string track_id = 2; // required 190 // } 191 192 // Used for: 193 // - adding a track play (i.e. track has been streamed >=45s) 194 // message Play { 195 // string user_id = 1; // required 196 // string track_id = 2; // required 197 // string type = 3; // required 198 // float credits = 4; // credits spent by user 199 // } 200 201 // message CreatePlayRequest { 202 // Play play = 1; // required 203 // float updated_credits = 2; // required 204 // } 205 206 // message CreatePlayResponse { 207 // int32 updated_play_count = 1; // required 208 // float updated_credits = 2; // required 209 // }