-
Notifications
You must be signed in to change notification settings - Fork 6
/
user-service.proto
132 lines (113 loc) · 3.71 KB
/
user-service.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
syntax = "proto3";
import "google/api/annotations.proto";
import "google/api/http.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "my-info.proto";
import "user-documents.proto";
import "token/gender.proto";
package ua.gov.diia.user;
option java_multiple_files = true;
option java_package = "ua.gov.diia.user";
service UserService {
rpc GetSubscribedSegments(GetSubscribedSegmentsRequest)
returns (GetSubscribedSegmentsResponse) {}
rpc GetUserDocuments(ua.gov.diia.user.userdocuments.GetUserDocumentsRequest)
returns (ua.gov.diia.user.userdocuments.GetUserDocumentsResponse) {}
rpc HasDocuments(ua.gov.diia.user.userdocuments.HasDocumentsRequest)
returns (ua.gov.diia.user.userdocuments.HasDocumentsResponse) {}
rpc GetUserInfoForFilters(GetInfoForFiltersRequest)
returns (GetInfoForFiltersReply) {}
rpc GetUserProfileFeatures(GetUserProfileFeaturesRequest)
returns (GetUserProfileFeaturesResponse) {}
rpc GetUserProfiles(GetUserProfilesRequest)
returns (GetUserProfilesResponse) {}
rpc GetMyInfo(ua.gov.diia.myinfo.GetMyInfoReq)
returns (ua.gov.diia.myinfo.GetMyInfoRes) {
option (google.api.http) = {
get : "/api/v1/my-info"
};
}
rpc GetFamily(ua.gov.diia.myinfo.GetFamilyReq)
returns (ua.gov.diia.myinfo.GetFamilyRes) {
option (google.api.http) = {
get : "/api/v1/my-info/family"
};
}
rpc GetUserBirthRecord(ua.gov.diia.myinfo.GetUserBirthRecordReq)
returns (ua.gov.diia.myinfo.GetUserBirthRecordRes) {
option (google.api.http) = {
post : "/api/v1/my-info/user-birth-record"
};
}
rpc GetActRecords(ua.gov.diia.myinfo.GetActRecordsReq)
returns (ua.gov.diia.myinfo.GetActRecordsRes) {
option (google.api.http) = {
post : "/api/v1/my-info/act-records/{recordType}"
};
}
rpc HideActRecord(ua.gov.diia.myinfo.HideActRecordReq)
returns (ua.gov.diia.myinfo.HideActRecordRes) {
option (google.api.http) = {
put : "/api/v1/my-info/act-records/hide/{recordType}/{id}"
};
}
rpc UnhideActRecords(ua.gov.diia.myinfo.UnhideActRecordsReq)
returns (ua.gov.diia.myinfo.UnhideActRecordsRes) {
option (google.api.http) = {
put : "/api/v1/my-info/act-records/unhide/{recordType}"
};
}
rpc UpdateUserSettings(UpdateUserSettingsReq)
returns (google.protobuf.Empty) {
option (google.api.http) = {
post : "/api/v1/user/settings"
};
}
}
message GetSubscribedSegmentsRequest { string userIdentifier = 1; }
message GetSubscribedSegmentsResponse { repeated string segments = 1; }
message GetInfoForFiltersRequest { string userIdentifier = 1; }
message GetInfoForFiltersReply {
int32 age = 1;
Gender gender = 2;
map<string, int32> documents = 3;
optional string organizationId = 4;
}
enum Gender {
male = 0;
female = 1;
}
message GetUserProfileFeaturesRequest {
string userIdentifier = 1;
repeated ProfileFeature features = 2;
enum ProfileFeature {
office = 0;
student = 1;
}
}
message GetUserProfileFeaturesResponse {
optional DiiaOfficeProfile office = 1;
}
message GetUserProfilesRequest { repeated string userIdentifiers = 1; }
message GetUserProfilesResponse { repeated UserProfile userProfiles = 1; }
message UserProfile {
string identifier = 1;
ua.gov.diia.types.token.Gender gender = 2;
google.protobuf.Timestamp birthDay = 3;
}
message DiiaOfficeProfile {
string profileId = 1;
string organizationId = 2;
string unitId = 3;
repeated string scopes = 4;
bool isOrganizationAdmin = 5;
Status status = 6;
optional string googleWorkspace = 7;
enum Status {
ACTIVE = 0;
SUSPENDED = 1;
DISMISSED = 2;
}
}
message UpdateUserSettingsReq { optional bool myInfoUsePassportPhoto = 1; }