github.com/resonatecoop/user-api@v1.0.0-13.0.20220915120639-05dc9c04014a/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    int32 legacy_id = 2;
    67    string username = 3; // required
    68    string full_name = 4; // required
    69    string first_name = 5;
    70    string last_name = 6;
    71    string country = 7;
    72    bool email_confirmed = 8;
    73    bool member = 9;
    74    int32 role_id = 10;
    75    int32 tenant_id = 11;
    76    bool newsletter_notification = 12;
    77    repeated string personas = 13;
    78    repeated string owned_groups = 14;
    79    repeated string followed_groups = 15;
    80    //string email = 3; // required
    81    //bytes avatar = 9;
    82    //string display_name = 4; // required TODO remove
    83    //repeated RelatedUserGroup owner_of_groups = 13;
    84    //StreetAddress residence_address = 14;
    85  }
    86  
    87  message UserMembershipResponse {
    88    string id = 1;
    89    string start = 2;
    90    string end = 3;
    91    string membership_class = 4;
    92  }
    93  
    94  message UserPublicResponse {
    95    string id = 1;
    96    int32 legacy_id = 2;
    97    string username = 3; // required
    98    string full_name = 4; // required
    99    string first_name = 5;
   100    string last_name = 6;
   101    string country = 7;
   102    bool member = 8;
   103    repeated string personas = 9;
   104    repeated string owned_groups = 10;
   105    repeated string followed_groups = 11;
   106    int32 role_id = 12;
   107    //bytes avatar = 9;
   108    //string display_name = 4; // required TODO remove
   109  }
   110  
   111  message UserAddRequest {
   112    string username = 1; // required
   113    string full_name = 2; // required
   114    string first_name = 3;
   115    string last_name = 4;
   116    bool member = 5;
   117    bool newsletter_notification = 6;
   118    string country = 7;
   119    repeated string followed_groups = 8;
   120    optional int32 role_id = 9;
   121    //string email = 2; // required
   122    //repeated string favorite_tracks = 10;
   123    //bytes avatar = 8;
   124    //string display_name = 3; // required TODO remove
   125    //repeated RelatedUserGroup owner_of_groups = 12;
   126    //StreetAddress residence_address = 13;
   127  }
   128  
   129  message UserListResponse {
   130    repeated UserPrivateResponse user = 1;
   131  }
   132  
   133  // message User {
   134  //   string id = 1;
   135  // }
   136  
   137  // syntax = "proto3";
   138  
   139  
   140  // option go_package = "user";
   141  
   142  // import "user-api/rpc/track/service.proto";
   143  
   144  
   145  // service UserService {
   146  //   rpc AddUser(User) returns (User);
   147  //   rpc GetUser(User) returns (User);
   148  //   rpc UpdateUser(User) returns (Empty);
   149  //   rpc DeleteUser(User) returns (Empty);
   150  //   rpc FollowGroup(UserToUserGroup) returns (Empty);
   151  //   rpc UnfollowGroup(UserToUserGroup) returns (Empty);
   152  //   // rpc AddFavoriteTrack(UserToTrack) returns (Empty);
   153  //   // rpc RemoveFavoriteTrack(UserToTrack) returns (Empty);
   154  
   155  //   // User Library
   156  //   // rpc GetPlaylists(User) returns (Playlists);
   157  //   // rpc GetFavoriteTracks(User) returns (Tracks);
   158  //   // rpc GetOwnedTracks(User) returns (Tracks);
   159  //   // rpc GetTrackHistory(User) returns (Tracks);
   160  
   161  //   // rpc GetSupportedArtists(User) returns (Artists);
   162  //   // rpc CreatePlay(CreatePlayRequest) returns (CreatePlayResponse); Payment API
   163  // }
   164  
   165  
   166  // message Playlists {
   167  //   repeated RelatedTrackGroup playlists = 1;
   168  // }
   169  
   170  // message Tracks {
   171  //   repeated Track tracks = 1;
   172  // }
   173  
   174  
   175  
   176  // message Artists {
   177  //   repeated RelatedUserGroup artists = 1;
   178  // }
   179  
   180  // Used for:
   181  // - following/unfollowing group
   182  // message UserToUserGroup {
   183  //   string user_id = 1; // required
   184  //   string user_group_id = 2; // required
   185  // }
   186  
   187  // Used for:
   188  // - adding/removing favorite tracks
   189  // message UserToTrack {
   190  //   string user_id = 1; // required
   191  //   string track_id = 2; // required
   192  // }
   193  
   194  // Used for:
   195  // - adding a track play (i.e. track has been streamed >=45s)
   196  // message Play {
   197  //   string user_id = 1; // required
   198  //   string track_id = 2; // required
   199  //   string type = 3; // required
   200  //   float credits = 4; // credits spent by user
   201  // }
   202  
   203  // message CreatePlayRequest {
   204  //   Play play = 1; // required
   205  //   float updated_credits = 2; // required
   206  // }
   207  
   208  // message CreatePlayResponse {
   209  //   int32 updated_play_count = 1; // required
   210  //   float updated_credits = 2; // required
   211  // }