Skip to content

Commit bec43ea

Browse files
committed
feat: Update events
1 parent e019994 commit bec43ea

File tree

3 files changed

+12
-27
lines changed

3 files changed

+12
-27
lines changed

v3/auth.proto

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ service AuthService {
88
rpc Authorize(AuthorizeRequest) returns (AuthorizeResponse) {}
99
}
1010

11+
message ResourceAction {
12+
string resource_id = 1;
13+
aruna.api.v3.Permission permission = 2;
14+
}
15+
1116
message AuthorizeRequest {
12-
string token = 1;
13-
repeated string resource_ids = 2;
14-
aruna.api.v3.Permission permission = 3;
15-
string current_state = 4;
17+
repeated ResourceAction actions = 1;
1618
}
1719

1820
message AuthorizeResponse {
1921
bool authorized = 1;
20-
string message = 2;
21-
bool should_update = 3;
22+
string expected_state = 2;
2223
}

v3/events.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ service EventsService {
88
rpc GetEvents(GetEventsRequest) returns (GetEventsResponse) {}
99
}
1010

11-
1211
message GetEventsRequest {
13-
string start_after = 1; // Base64 encoded event_id
14-
int32 batch_size = 2;
12+
string consumer_id = 1;
13+
string start_after = 2; // Base64 encoded event_id
14+
int32 batch_size = 3;
1515
}
1616

1717
message GetEventsResponse {

v3/models.proto

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -153,24 +153,8 @@ message Endpoint {
153153
// TODO: Add more fields
154154
}
155155

156-
enum EventType {
157-
EVENT_TYPE_UNSPECIFIED = 0;
158-
EVENT_TYPE_CREATED = 1;
159-
EVENT_TYPE_UPDATED = 2;
160-
EVENT_TYPE_DELETED = 3;
161-
}
162-
163-
// field_name: lables, value: {key: "foo", value: "bar"}, removed: false
164-
// field_name: relations, value: {from_id: "123", to_id: "456", relation_type: "is_part_of"}, removed: false
165-
message FieldUpdate {
166-
string field_name = 1;
167-
string value = 2;
168-
bool removed = 3;
169-
}
170-
171156
message Event {
172157
string event_id = 1;
173-
string target_id = 2;
174-
EventType event_type = 3;
175-
repeated FieldUpdate field_updates = 4;
158+
string event_body = 2;
159+
repeated string target_ids = 3;
176160
}

0 commit comments

Comments
 (0)