-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.proto
97 lines (81 loc) · 2.85 KB
/
user.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
syntax = "proto3";
package user;
import "entities.proto";
import "google/protobuf/struct.proto";
service UserService {
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse) {}
rpc GetUser(GetUserRequest) returns (GetUserResponse) {}
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) {}
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) {}
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) {}
rpc IsUserAccountOnboarded(IsUserAccountOnboardedRequest)
returns (IsUserAccountOnboardedResponse) {}
}
message UserWhereUniqueInput {
optional string id = 1;
optional string email = 2;
}
message UpdateUserInput {
optional string firstname = 1;
optional string lastname = 2;
optional string email = 3;
optional string title = 5;
optional bool isOrganisationOwner = 6;
optional bool hasVerifiedEmail = 7;
repeated string teamIds = 8;
repeated string workspaceIds = 9;
repeated string projectIds = 10;
repeated string collaborationSentIds = 11;
repeated string collaborationReceivedIds = 12;
optional string googleId = 13;
optional string facebookId = 14;
optional string linkedInId = 15;
repeated string sharedWorkspaceIds = 16;
repeated string sharedProjectIds = 17;
repeated string sharedOrganisationIds = 18;
optional string ownedOrganisationId = 19;
optional string defaultOrganisationId = 20;
optional string defaultWorkspaceId = 21;
optional string defaultProjectId = 22;
optional google.protobuf.Struct userSettings = 23;
}
message UpdateUserRequest {
UserWhereUniqueInput where = 1;
UpdateUserInput data = 2;
}
message UpdateUserResponse { string userId = 3; }
message DeleteUserRequest { UserWhereUniqueInput where = 1; }
message DeleteUserResponse { string userId = 3; }
message GetUserRequest {
optional string id = 1;
optional string email = 2;
optional string googleId = 3;
optional string facebookId = 4;
optional string linkedInId = 5;
}
message GetUserResponse { entities.User user = 3; }
message CreateUserRequest {
string firstname = 1;
string lastname = 2;
string email = 3;
optional string password = 4;
optional string title = 5;
optional string googleId = 6;
optional string facebookId = 7;
optional string linkedInId = 8;
optional string defaultOrganisationId = 9;
optional string defaultWorkspaceId = 10;
optional string defaultProjectId = 11;
google.protobuf.Struct defaultUserSettings = 12;
string id = 13; // this should be the authentication service user ID
}
message CreateUserResponse { string userId = 3; }
message GetUsersRequest {
google.protobuf.Struct paginateOptions = 1;
google.protobuf.Struct findOptions = 2;
}
message GetUsersResponse { google.protobuf.Struct users = 3; }
message IsUserAccountOnboardedRequest { string userId = 1; }
message IsUserAccountOnboardedResponse {
optional bool isUserAccountOnboarded = 3;
}