summaryrefslogtreecommitdiffstats
path: root/lib/sellershut-core/proto
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sellershut-core/proto')
-rw-r--r--lib/sellershut-core/proto/users/users.proto (renamed from lib/sellershut-core/proto/profile/profile.proto)42
1 files changed, 32 insertions, 10 deletions
diff --git a/lib/sellershut-core/proto/profile/profile.proto b/lib/sellershut-core/proto/users/users.proto
index 61181b3..d1cf692 100644
--- a/lib/sellershut-core/proto/profile/profile.proto
+++ b/lib/sellershut-core/proto/users/users.proto
@@ -1,10 +1,18 @@
syntax = "proto3";
-package profile;
+package users;
import "google/protobuf/timestamp.proto";
-// A message representing a user profile
+enum UserType {
+ PERSON = 0;
+ APPLICATION = 1;
+ GROUP = 2;
+ ORGANIZATION = 3;
+ SERVICE = 4;
+}
+
+// A message representing a user user
message User {
// Unique identifier for the user
string id = 1;
@@ -20,9 +28,13 @@ message User {
google.protobuf.Timestamp updated_at = 6;
// User-provided description or bio
optional string description = 7;
+ // User type
+ UserType user_type = 8;
+ // Public key
+ string public_key = 9;
}
-// Request message for creating a new user profile
+// Request message for creating a new user
message CreateUserRequest {
// Email address of the new user
string email = 1;
@@ -36,22 +48,32 @@ message CreateUserResponse {
string temp_id = 1;
}
-// Message to finalise profile creation
+// Message to finalise user creation
message CompleteUserRequest {
// ID of the user to finalise
string id = 1;
- // Required: username to finalise the profile
+ // Required: username to finalise the user
string username = 2;
// Optional: user-provided description
optional string description = 3;
// Optional: update avatar
optional string avatar = 4;
+ // Inbox URL for this user
+ string inbox = 5;
+ // Outbox URL for this user
+ string outbox = 6;
+ // Is this user local or remote
+ bool local = 7;
+ // Public key for this user
+ string public_key = 8;
+ // User type
+ UserType user_type = 9;
}
-// Profile gRPC service
-service Profile {
- // Create a new user profile
+// Users gRPC service
+service UsersService {
+ // Create a new user
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
- // Complete Profile
- rpc CompleteProfile (CompleteUserRequest) returns (User);
+ // Complete user
+ rpc CompleteUser (CompleteUserRequest) returns (User);
}