mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:17:32 +00:00
fix(adminAPI): localize event type (#5059)
* fix(adminAPI): localisation of event types, aggregate types * fix(adminAPI): validations of ListEvent request * implement caching of editor user information
This commit is contained in:
@@ -13,6 +13,7 @@ import "zitadel/member.proto";
|
||||
import "zitadel/event.proto";
|
||||
import "zitadel/management.proto";
|
||||
import "zitadel/v1.proto";
|
||||
import "zitadel/message.proto";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
@@ -4854,27 +4855,32 @@ message ListEventsRequest {
|
||||
}
|
||||
];
|
||||
string editor_user_id = 4 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\"";
|
||||
}
|
||||
];
|
||||
// the types are or filtered and must match the type exatly
|
||||
repeated string event_types = 5 [
|
||||
(validate.rules).repeated = {max_items: 30},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[\"user.human.added\", \"user.machine\"]";
|
||||
}
|
||||
];
|
||||
string aggregate_id = 6 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\"";
|
||||
}
|
||||
];
|
||||
string aggregate_type = 7 [
|
||||
repeated string aggregate_types = 7 [
|
||||
(validate.rules).repeated = {max_items: 10},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"user\"";
|
||||
}
|
||||
];
|
||||
string resource_owner = 8 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\"";
|
||||
}
|
||||
@@ -4896,11 +4902,11 @@ message ListEventsResponse {
|
||||
message ListEventTypesRequest {}
|
||||
|
||||
message ListEventTypesResponse {
|
||||
repeated string event_types = 1;
|
||||
repeated zitadel.event.v1.EventType event_types = 1;
|
||||
}
|
||||
|
||||
message ListAggregateTypesRequest {}
|
||||
|
||||
message ListAggregateTypesResponse {
|
||||
repeated string aggregate_types = 1;
|
||||
repeated zitadel.event.v1.AggregateType aggregate_types = 1;
|
||||
}
|
||||
|
@@ -3,6 +3,8 @@ syntax = "proto3";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
|
||||
import "zitadel/message.proto";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
package zitadel.event.v1;
|
||||
@@ -20,7 +22,7 @@ message Event {
|
||||
}
|
||||
];
|
||||
google.protobuf.Struct payload = 5;
|
||||
string type = 6;
|
||||
EventType type = 6;
|
||||
}
|
||||
|
||||
message Editor {
|
||||
@@ -31,6 +33,16 @@ message Editor {
|
||||
|
||||
message Aggregate {
|
||||
string id = 1;
|
||||
string type = 2;
|
||||
AggregateType type = 2;
|
||||
string resource_owner = 3;
|
||||
}
|
||||
|
||||
message EventType {
|
||||
string type = 1;
|
||||
zitadel.v1.LocalizedMessage localized = 2;
|
||||
}
|
||||
|
||||
message AggregateType {
|
||||
string type = 1;
|
||||
zitadel.v1.LocalizedMessage localized = 2;
|
||||
}
|
Reference in New Issue
Block a user