Skip to content

Commit 66d9f8b

Browse files
committed
feat: Updated API
1 parent 90fafaf commit 66d9f8b

File tree

5 files changed

+100
-21
lines changed

5 files changed

+100
-21
lines changed

v3/events.proto

Lines changed: 0 additions & 19 deletions
This file was deleted.

v3/info.proto

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,34 @@ import "models.proto";
66

77
service InfoService {
88
rpc GetAllRelationInfos(GetAllRelationInfosRequest) returns (GetAllRelationInfosResponse) {}
9+
rpc Search(SearchRequest) returns (SearchResponse) {}
10+
rpc Stats(StatsRequest) returns (StatsResponse) {}
11+
rpc GetEvents(GetEventsRequest) returns (GetEventsResponse) {}
912
}
1013

1114
message GetAllRelationInfosRequest {}
1215

1316
message GetAllRelationInfosResponse {
1417
repeated aruna.api.v3.RelationInfo relation_infos = 1;
15-
}
18+
}
19+
20+
message SearchRequest {
21+
string query = 1;
22+
string filter = 2;
23+
uint64 limit = 3;
24+
uint64 offset = 4;
25+
}
26+
27+
message SearchResponse {
28+
uint64 expected_hits = 1;
29+
repeated aruna.api.v3.GenericNode resources = 2;
30+
}
31+
32+
message GetEventsRequest {
33+
string subscriber_id = 1;
34+
string acknowledge_from = 2; // optional
35+
}
36+
37+
message GetEventsResponse {
38+
string events = 1;
39+
}

v3/licenses.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
syntax = "proto3";
2+
3+
package aruna.api.v3;
4+
5+
import "models.proto";
6+
7+
service LicenseService {
8+
rpc GetLicense(GetLicenseRequest) returns (GetLicenseResponse) {}
9+
rpc CreateLicense(CreateLicenseRequest) returns (CreateLicenseResponse) {}
10+
}
11+
12+
message GetLicenseRequest {
13+
string licenses = 1;
14+
}
15+
16+
message GetLicenseResponse {
17+
aruna.api.v3.License licenses = 1;
18+
}
19+
20+
message CreateLicenseRequest {
21+
string name = 1;
22+
string description = 2;
23+
string license_terms = 3;
24+
}
25+
message CreateLicenseResponse {
26+
string license_id = 1;
27+
}

v3/models.proto

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,34 @@ message Event {
164164
string event_id = 1;
165165
string event_body = 2;
166166
repeated string target_ids = 3;
167-
}
167+
}
168+
169+
message Component {
170+
string id = 1;
171+
string name = 2;
172+
string description = 3;
173+
ComponentType component_type = 4;
174+
repeated Endpoint endpoints = 5;
175+
bool public = 6;
176+
bool deleted = 7;
177+
}
178+
179+
message License {
180+
string id = 1;
181+
string name = 2;
182+
string description = 3;
183+
string terms = 4;
184+
bool deleted = 5;
185+
}
186+
187+
message GenericNode {
188+
oneof node {
189+
Resource resource = 1;
190+
User user = 2;
191+
ServiceAccount service_account = 3;
192+
Group user_group = 4;
193+
Realm realm = 5;
194+
Component component = 6;
195+
License license = 7;
196+
}
197+
}

v3/user_service.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ service UserService {
1111
rpc GetUser(GetUserRequest) returns (GetUserResponse) {}
1212
rpc DeleteToken(DeleteTokenRequest) returns (DeleteTokenResponse) {}
1313
rpc GetTokens(GetTokensRequest) returns (GetTokensResponse) {}
14+
rpc GetUserRealms(GetUserRealmsRequest) returns (GetUserRealmsResponse) {}
15+
rpc GetGroups(GetGroupsRequest) returns (GetGroupsResponse) {}
1416

1517
// rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) {}
1618
// TODO: S3 credential requests ?
@@ -57,3 +59,18 @@ message GetTokensRequest {}
5759
message GetTokensResponse {
5860
repeated aruna.api.v3.Token tokens = 1;
5961
}
62+
63+
message GetUserRealmsRequest {}
64+
65+
message GetUserRealmsResponse {
66+
repeated string realms = 1;
67+
}
68+
message GetGroupsRequest {}
69+
message GetGroupsResponse {
70+
repeated GroupWithPermission group_with_permission = 1;
71+
}
72+
73+
message GroupWithPermission {
74+
aruna.api.v3.Group group = 1;
75+
Permission permission = 2;
76+
}

0 commit comments

Comments
 (0)