mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:33:28 +00:00
feat: extend session search service (#6746)
* feat: extend session search service (#6029) add two more searching criteria - human user id and session creation date optional sorting by the session creation date * fix: use correct column identifier * fix: implement Col() * chore: fix unit tests * chore: fix linter warnings --------- Co-authored-by: Fabi <fabienne@zitadel.com>
This commit is contained in:
@@ -92,7 +92,14 @@ enum TextQueryMethod {
|
||||
TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = 7;
|
||||
}
|
||||
|
||||
|
||||
enum ListQueryMethod {
|
||||
LIST_QUERY_METHOD_IN = 0;
|
||||
}
|
||||
|
||||
enum TimestampQueryMethod {
|
||||
TIMESTAMP_QUERY_METHOD_EQUALS = 0;
|
||||
TIMESTAMP_QUERY_METHOD_GREATER = 1;
|
||||
TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS = 2;
|
||||
TIMESTAMP_QUERY_METHOD_LESS = 3;
|
||||
TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS = 4;
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ syntax = "proto3";
|
||||
|
||||
package zitadel.session.v2beta;
|
||||
|
||||
import "zitadel/object.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "validate/validate.proto";
|
||||
@@ -137,6 +138,8 @@ message SearchQuery {
|
||||
option (validate.required) = true;
|
||||
|
||||
IDsQuery ids_query = 1;
|
||||
UserIDQuery user_id_query = 2;
|
||||
CreationDateQuery creation_date_query = 3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +147,20 @@ message IDsQuery {
|
||||
repeated string ids = 1;
|
||||
}
|
||||
|
||||
message UserIDQuery {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message CreationDateQuery {
|
||||
google.protobuf.Timestamp creation_date = 1;
|
||||
zitadel.v1.TimestampQueryMethod method = 2 [
|
||||
(validate.rules).enum.defined_only = true,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "defines which timestamp comparison method is used";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message UserAgent {
|
||||
optional string fingerprint_id = 1;
|
||||
optional string ip = 2;
|
||||
@@ -157,4 +174,9 @@ message UserAgent {
|
||||
repeated string values = 1;
|
||||
}
|
||||
map<string,HeaderValues> header = 4;
|
||||
}
|
||||
|
||||
enum SessionFieldName {
|
||||
SESSION_FIELD_NAME_UNSPECIFIED = 0;
|
||||
SESSION_FIELD_NAME_CREATION_DATE = 1;
|
||||
}
|
@@ -248,6 +248,7 @@ service SessionService {
|
||||
message ListSessionsRequest{
|
||||
zitadel.object.v2beta.ListQuery query = 1;
|
||||
repeated SearchQuery queries = 2;
|
||||
zitadel.session.v2beta.SessionFieldName sorting_column = 3;
|
||||
}
|
||||
|
||||
message ListSessionsResponse{
|
||||
|
Reference in New Issue
Block a user